Files
geointel/backend/tests/test_sprint133_detection_threshold_calibration_ux.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

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