from __future__ import annotations from pathlib import Path from tests.frontend_contract import read_feature ROOT = Path(__file__).resolve().parents[2] def test_frontend_wires_v1_workbench_status_strip() -> None: app = read_feature("shell") overview = read_feature("shell") component = (ROOT / "frontend" / "src" / "components" / "WorkbenchStatusStrip.tsx").read_text(encoding="utf-8") css = (ROOT / "frontend" / "src" / "styles" / "app.css").read_text(encoding="utf-8") assert "WorkbenchStatusStrip" in overview assert "selectedProject={selectedProject}" in overview assert "qualityChecks={qualityChecks}" in overview assert "activeLayerFeatureCount={mapFeatureCount}" in app assert "selectedAreaHasGeometry={Boolean(areaFeatureCollection)}" in app assert "Platformstatus" in component assert "Status werkruimte:" in component assert "Kaartwerkruimte is gebruiksklaar" in component assert "workbench-status-strip" in css assert "status-tile-ready" in css def test_workbench_status_strip_summarizes_existing_v1_loop_only() -> None: component = (ROOT / "frontend" / "src" / "components" / "WorkbenchStatusStrip.tsx").read_text(encoding="utf-8") assert "ProjectRead" in component assert "AreaRead" in component assert "DatasetCreateResponse" in component assert "QualityCheckRead" in component assert "ExportRead" in component assert "fetch(" not in component assert "api" not in component.lower()