Files
geointel/backend/tests/test_sprint133_detection_threshold_calibration_ux.py
Jens faeb58ef6d
GeoIntel release gates / Compile, test, contracts and builds (push) Successful in 1m49s
GeoIntel release gates / Python and npm vulnerability policy (push) Successful in 21s
GeoIntel release gates / Production AI image, SBOM and container scan (push) Successful in 5m39s
GeoIntel release gates / Deploy exact gated revision to Unraid (push) Failing after 58m43s
Initial public release
2026-08-31 21:56:53 +02:00

38 lines
1.6 KiB
Python

from pathlib import Path
from tests.frontend_contract import read_feature
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"
todo = ROOT / "docs" / "TODO.md"
source = detection_lab.read_text(encoding="utf-8")
app_source = read_feature("shell")
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