18 lines
756 B
Python
18 lines
756 B
Python
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
def test_map_source_mode_keeps_database_layers_distinct_from_analysis_results() -> None:
|
|
app = (ROOT / "frontend/src/App.tsx").read_text(encoding="utf-8")
|
|
workspace = (ROOT / "frontend/src/components/map/MapWorkspace.tsx").read_text(encoding="utf-8")
|
|
|
|
assert "const [mapContentMode, setMapContentMode]" in app
|
|
assert "mapContentMode === 'analysis' && analysisMapLayerAvailable" in app
|
|
assert "setMapContentMode('dataset')" in app
|
|
assert 'aria-label="Map content source"' in workspace
|
|
assert "onSetMapContentMode('dataset')" in workspace
|
|
assert "onSetMapContentMode('analysis')" in workspace
|
|
assert "disabled={!analysisLayerAvailable}" in workspace
|