Files
geointel/backend/tests/test_sprint109_map_selection_qa_shortcut.py
T
NuklearRabbit edb762219c
Managed validation / full (pull_request) Canceled after 0s
GeoIntel release gates / Compile, test, contracts and builds (pull_request) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (pull_request) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (pull_request) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Failing after 22s
GeoIntel release gates / Compile, test, contracts and builds (push) Waiting to run
GeoIntel release gates / GIS image, SBOM and container scan (push) Failing after 45s
fix(ci): restore release gates and contract baseline (fixes #4)
2026-08-29 02:00:23 +02:00

33 lines
1.2 KiB
Python

from pathlib import Path
from tests.frontend_contract import read_feature
ROOT = Path(__file__).resolve().parents[2]
def test_map_selection_qa_shortcut_uses_existing_qa_workflow_contract() -> None:
hook_path = ROOT / "frontend" / "src" / "hooks" / "useMapSelectionQa.ts"
app = read_feature("shell")
map_workspace = read_feature("map_workspace")
assert hook_path.exists()
hook = hook_path.read_text(encoding="utf-8")
assert "qaApi.runQa" in hook
assert "loadQualityChecks" in hook
assert "candidateDataset = latestSelectionDataset" in hook
assert "candidate_dataset_id: candidateDataset.id" in hook
assert "reference_dataset_id: selectedMapQaReferenceDatasetId" in hook
assert "setMapQaResult" in hook
assert "useMapSelectionQa" in app
assert "mapQaReferenceDatasets={referenceDatasets}" in app
assert "onRunMapSelectionQa={runMapSelectionQa}" in app
assert "Bewaarde laag controleren" in map_workspace
assert "mapSelectionQaError" in map_workspace
assert "mapSelectionQaResult" in map_workspace
def test_app_keeps_qa_api_calls_out_of_orchestration() -> None:
app = read_feature("shell")
assert "qaApi" not in app
assert "from './services/api'" not in app