Complete the V1 analysis handoff
This commit is contained in:
@@ -24,7 +24,7 @@ def test_map_first_explorer_is_the_default_product_flow() -> None:
|
||||
assert "useMapThemeSelectionInsights" in workspace
|
||||
assert "datasetsApi.selectVectorFeatures" in read("frontend/src/hooks/useMapThemeSelectionInsights.ts")
|
||||
assert "activeSelectionResult" in workspace
|
||||
assert "downloadActiveThemeSelection" in workspace
|
||||
assert "downloadActiveThemeResult" in workspace
|
||||
assert "disabled={!activeSelectionResult}" in workspace
|
||||
assert "bboxesEqual(mapSelectionBbox, selectedAreaBbox)" in workspace
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
|
||||
def read(path: str) -> str:
|
||||
return (ROOT / path).read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def test_theme_overview_names_the_metric_instead_of_showing_a_bare_value() -> None:
|
||||
workspace = read("frontend/src/components/map/MapWorkspace.tsx")
|
||||
styles = read("frontend/src/styles/app.css")
|
||||
|
||||
assert 'className="geo-theme-result-value"' in workspace
|
||||
assert "item.result.summary.metric_label" in workspace
|
||||
assert ".geo-theme-result-value" in styles
|
||||
|
||||
|
||||
def test_current_and_historical_results_are_downloadable() -> None:
|
||||
workspace = read("frontend/src/components/map/MapWorkspace.tsx")
|
||||
|
||||
assert "activeTheme.id}-analysis.json" in workspace
|
||||
assert "activeTheme.id}-selection.geojson" in workspace
|
||||
assert "application/geo+json" in workspace
|
||||
assert "downloadTemporalComparison" in workspace
|
||||
assert "Download vergelijking" in workspace
|
||||
assert "Kopieer vergelijking" in workspace
|
||||
|
||||
|
||||
def test_completed_analysis_hands_off_to_ai_and_downloads_responsively() -> None:
|
||||
app = read("frontend/src/App.tsx")
|
||||
workspace = read("frontend/src/components/map/MapWorkspace.tsx")
|
||||
styles = read("frontend/src/styles/app.css")
|
||||
|
||||
assert "onOpenAssistant: () => void" in workspace
|
||||
assert "onOpenExports: () => void" in workspace
|
||||
assert "Stel AI-vraag" in workspace
|
||||
assert "Open downloads" in workspace
|
||||
assert "onOpenAssistant={() => setActiveWorkspace('assistant')}" in app
|
||||
assert "onOpenExports={() => setActiveWorkspace('exports')}" in app
|
||||
assert ".geo-result-next-actions" in styles
|
||||
assert ".geo-results-panel > .geo-result-next-actions" in styles
|
||||
Reference in New Issue
Block a user