Files
geointel/backend/tests/test_sprint19_map_workbench.py
T
NuklearRabbit edb762219c
Managed validation / full (pull_request) Canceled after 0s
GeoIntel release gates / Compile, test, contracts and builds (pull_request) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (pull_request) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (pull_request) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Failing after 22s
GeoIntel release gates / Compile, test, contracts and builds (push) Waiting to run
GeoIntel release gates / GIS image, SBOM and container scan (push) Failing after 45s
fix(ci): restore release gates and contract baseline (fixes #4)
2026-08-29 02:00:23 +02:00

39 lines
1.4 KiB
Python

from __future__ import annotations
from pathlib import Path
from tests.frontend_contract import read_feature
ROOT = Path(__file__).resolve().parents[2]
def test_geomap_exposes_v1_layer_controls_and_feature_inspection_contract() -> None:
geomap = (ROOT / "frontend" / "src" / "components" / "GeoMap.tsx").read_text(encoding="utf-8")
assert "visible?: boolean" in geomap
assert "opacity?: number" in geomap
assert "onFeatureSelect?: (feature: GeoJSON.Feature | null) => void" in geomap
assert "queryRenderedFeatures" in geomap
assert "mapStyleReady" in geomap
assert "map.on('load'" in geomap
assert "if (!map || !mapStyleReady)" in geomap
assert "if (!map || !map.isStyleLoaded()) return" in geomap
assert "setStyle(" not in geomap
assert "setLayoutProperty('dataset-fill', 'visibility'" in geomap
assert "setPaintProperty('dataset-fill', 'fill-opacity', opacity)" in geomap
def test_app_wires_map_workbench_component() -> None:
app = read_feature("shell")
component = read_feature("map_workspace")
assert "mapLayerVisible" in app
assert "mapLayerOpacity" in app
assert "selectedMapFeature" in app
assert "<MapWorkspace" in app
assert "onSelectMapFeature={setSelectedMapFeature}" in app
assert "Actieve kaartlaag" in component
assert "Dekking van de kaartlaag" in component
assert "Objectinspectie" in component
assert "onFeatureSelect={onSelectMapFeature}" in component