Improve operational GIS map workflow
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled

This commit is contained in:
Codex
2026-07-04 23:29:33 +02:00
parent 531c4e4e1d
commit 21374ed187
10 changed files with 246 additions and 4 deletions
@@ -0,0 +1,29 @@
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parents[2]
def test_map_uses_road_basemap_with_attribution_and_env_override() -> None:
geo_map = (REPO_ROOT / "frontend/src/components/GeoMap.tsx").read_text(encoding="utf-8")
assert "DEFAULT_ROAD_BASEMAP_STYLE" in geo_map
assert "https://tile.openstreetmap.org/{z}/{x}/{y}.png" in geo_map
assert "OpenStreetMap contributors" in geo_map
assert "VITE_MAP_STYLE_URL" in geo_map
assert "AttributionControl" in geo_map
def test_map_workspace_can_select_persisted_database_layer_and_run_query() -> None:
map_workspace = (REPO_ROOT / "frontend/src/components/map/MapWorkspace.tsx").read_text(encoding="utf-8")
app_shell = (REPO_ROOT / "frontend/src/App.tsx").read_text(encoding="utf-8")
styles = (REPO_ROOT / "frontend/src/styles/app.css").read_text(encoding="utf-8")
assert "map-database-layer-select" in map_workspace
assert "Select persisted vector layer" in map_workspace
assert "Operational GIS run" in map_workspace
assert "vector_features" in map_workspace
assert "Run AOI/layer query" in map_workspace
assert "selectedMapDatasetId=" in app_shell
assert ".gis-test-run-surface" in styles
assert ".gis-test-run-grid" in styles