Add V1 map workbench controls
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
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 "setLayoutProperty('dataset-fill', 'visibility'" in geomap
|
||||
assert "setPaintProperty('dataset-fill', 'fill-opacity', opacity)" in geomap
|
||||
|
||||
|
||||
def test_app_wires_map_workbench_controls_and_property_inspector() -> None:
|
||||
app = (ROOT / "frontend" / "src" / "App.tsx").read_text(encoding="utf-8")
|
||||
|
||||
assert "mapLayerVisible" in app
|
||||
assert "mapLayerOpacity" in app
|
||||
assert "selectedMapFeature" in app
|
||||
assert "Layer visible" in app
|
||||
assert "Layer opacity" in app
|
||||
assert "Feature inspector" in app
|
||||
assert "onFeatureSelect={setSelectedMapFeature}" in app
|
||||
Reference in New Issue
Block a user