From 0aa991047fa515260d8c24a192f3fc06093ccfda Mon Sep 17 00:00:00 2001 From: Spark Date: Mon, 12 Oct 2026 13:53:59 -0400 Subject: [PATCH] =?UTF-8?q?test:=20palier=2015=20=E2=80=94=20tableaux=20pi?= =?UTF-8?q?lotage,=20ancres,=20SWR=20(frais/p=C3=A9rim=C3=A9/mutation)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_palier15.py | 112 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 tests/test_palier15.py diff --git a/tests/test_palier15.py b/tests/test_palier15.py new file mode 100644 index 0000000..bc0c84a --- /dev/null +++ b/tests/test_palier15.py @@ -0,0 +1,112 @@ +"""Palier 15 (0.19.0) — Performance + navigation Pilotage. + +- A : les boucles par dépôt sont parallélisées (le comportement + visible ne change pas — couvert par les paliers précédents) et + le cache du client passe en stale-while-revalidate (testé dans + test_gitea_client.py). +- C : /forecast devient un tableau de bord des jalons (une ligne + par jalon, ancres depuis le dashboard) et /health un tableau + trié par sévérité, avec sélecteur de projet sur le détail. +""" + +import asyncio + +import httpx + +from app.gitea_client import GiteaClient + + +def test_forecast_is_a_portfolio_table(client): + r = client.get("/forecast") + assert r.status_code == 200 + assert "pilot-table" in r.text + assert "jalon(s) ouvert(s)" in r.text + # One row for the demo milestone, anchored for dashboard links. + assert 'id="ms-Projets-demo"' in r.text + assert "Sprint 1" in r.text + # The per-project pace table is still there. + assert "Débit par projet" in r.text + + +def test_dashboard_milestone_links_into_forecast(client): + r = client.get("/") + assert r.status_code == 200 + assert 'href="/forecast#ms-Projets-demo"' in r.text + + +def test_health_index_is_a_severity_table(client): + r = client.get("/health") + assert r.status_code == 200 + assert "pilot-table" in r.text + assert "data-severity" in r.text + assert "Projets/demo" in r.text + + +def test_health_detail_has_project_switcher(client): + r = client.get("/health/Projets/demo") + assert r.status_code == 200 + assert 'id="health-switch"' in r.text + assert '