from pathlib import Path DASHBOARD_PATH = Path(__file__).parents[1] / "src" / "static" / "dashboard.html" def test_dashboard_contains_live_map_and_flow_visualization(): html = DASHBOARD_PATH.read_text(encoding="utf-8") assert "id=\"station-map\"" in html assert "id=\"river-flow\"" in html assert "fetch('/stations')" in html or 'fetch("/stations")' in html assert "fetch('/measurements/latest" in html or 'fetch(\"/measurements/latest' in html assert "leaflet" in html.lower() def _body(html: str) -> str: """Markup only. The STRINGS table repeats every English phrase, so a whole-file search would pass even if an element were deleted.""" return html[html.index(""):html.index("