extract and test the four-step GIS workflow
Extracted for its error paths, not its size. Every step can fail or return nothing, and each outcome has to leave the operator with a status that says where the chain stopped — a workflow reporting "afgerond" after a step produced nothing tells them a result exists when it does not. Inline in the component, none of that was exercised; it now has fourteen tests covering each stopping point, both rejection kinds, the reuse path and the preconditions. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,7 @@ MAP_WORKSPACE_SOURCES = (
|
||||
"components/map/mapWorkspaceUtils.ts",
|
||||
"hooks/useMapImageOverlays.ts",
|
||||
"hooks/useMapRectangleSelection.ts",
|
||||
"hooks/useFullGisWorkflow.ts",
|
||||
"components/map/MapExplorerView.tsx",
|
||||
"components/map/MapAdvancedWorkbench.tsx",
|
||||
)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from pathlib import Path
|
||||
from tests.frontend_contract import read_map_workspace
|
||||
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[2]
|
||||
@@ -19,7 +20,7 @@ def test_map_uses_road_basemap_with_attribution_and_env_override() -> None:
|
||||
|
||||
|
||||
def test_map_workspace_can_select_persisted_database_layer_and_run_query() -> None:
|
||||
map_workspace = (REPO_ROOT / "frontend/src/components/map/MapWorkspace.tsx").read_text(encoding="utf-8")
|
||||
map_workspace = read_map_workspace()
|
||||
app_shell = (REPO_ROOT / "frontend/src/App.tsx").read_text(encoding="utf-8")
|
||||
styles = (REPO_ROOT / "frontend/src/styles/app.css").read_text(encoding="utf-8")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user