Keep map theme state aligned
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-16 18:56:10 +02:00
parent cb5425ad1a
commit 1d515e4901
4 changed files with 29 additions and 5 deletions
@@ -258,3 +258,12 @@ def test_map_theme_ranking_prefers_newer_observation_over_feature_count() -> Non
assert observed_sort < feature_tiebreaker
assert "new Date(right.observed_at ?? 0).getTime()" in workspace
assert "if (observedAtDifference !== 0) return observedAtDifference" in workspace
def test_map_workspace_restores_theme_from_selected_dataset() -> None:
root = Path(__file__).resolve().parents[2]
workspace = (root / "frontend" / "src" / "components" / "map" / "MapWorkspace.tsx").read_text(encoding="utf-8")
assert "function themeIdForDataset(" in workspace
assert "useState<DataThemeId>(() =>" in workspace
assert "return themeIdForDataset(selectedDataset) ?? 'buildings'" in workspace
assert "const matchingThemeId = themeIdForDataset(selectedMapDataset)" in workspace