Files
geointel/backend/tests/test_sprint133_detection_threshold_calibration_ux.py
T
NuklearRabbit 7fbb42c9ef
Managed validation / full (pull_request) Successful in 18s
GeoIntel release gates / Compile, test, contracts and builds (pull_request) Successful in 2m56s
GeoIntel release gates / Python and npm vulnerability policy (pull_request) Successful in 24s
GeoIntel release gates / GIS image, SBOM and container scan (pull_request) Failing after 54s
test: align source contracts with modular workbench
2026-08-29 01:52:08 +02:00

38 lines
1.6 KiB
Python

from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
def test_detection_lab_exposes_persisted_threshold_calibration_comparison() -> None:
detection_lab = ROOT / "frontend" / "src" / "components" / "detection" / "DetectionLab.tsx"
app = ROOT / "frontend" / "src" / "WorkbenchApp.tsx"
todo = ROOT / "docs" / "TODO.md"
source = detection_lab.read_text(encoding="utf-8")
app_source = app.read_text(encoding="utf-8")
todo_source = todo.read_text(encoding="utf-8")
assert "qualityChecks: QualityCheckRead[]" in source
assert "buildCalibrationRows(detectionRuns, qualityChecks)" in source
assert "Kalibraties vergelijken" in source
assert "Vergelijk bewaarde analyseruns per zekerheidsdrempel" in source
assert "Beste F1-score" in source
assert "Beste precisie" in source
assert "Minste foutieve meldingen" in source
assert "Drempel" in source
assert "Precisie" in source
assert "Herkenningsgraad" in source
assert "F1" in source
assert "Fout positief" in source
assert "Fout negatief" in source
assert "Keur pas goed nadat meerdere gebieden" in source
assert "Nog geen kalibratievergelijking beschikbaar" in source
assert "metricValue(check, 'f1')" in source
assert "metricValue(check, 'precision')" in source
assert "metricValue(check, 'recall')" in source
assert "metricValue(check, 'false_positives')" in source
assert "confidenceThresholdForRun(run)" in source
assert "qualityChecks={qualityChecks}" in app_source
assert "[x] Add full threshold calibration comparison UX" in todo_source