Files
geointel/backend/tests/test_sprint133_detection_threshold_calibration_ux.py
T
Codex b50b250f72
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s
feat: simplify regional workbench language
2026-07-14 23:15:50 +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" / "App.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 "Recall" 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