"""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 '