From d9887c3d70b5e1b9c4b0a568165bfa3665133b4f Mon Sep 17 00:00:00 2001 From: Spark Date: Fri, 30 Oct 2026 11:43:43 -0400 Subject: [PATCH] =?UTF-8?q?Kanbante=200.45.5=20:=20tests=20du=20panneau=20?= =?UTF-8?q?d'alertes=20et=20des=20th=C3=A8mes=20(tests/test=5Falertes=5Fth?= =?UTF-8?q?eme.py)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_alertes_theme.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/test_alertes_theme.py diff --git a/tests/test_alertes_theme.py b/tests/test_alertes_theme.py new file mode 100644 index 0000000..98e0c37 --- /dev/null +++ b/tests/test_alertes_theme.py @@ -0,0 +1,25 @@ +"""Panneau d'alertes unifiées (Fusion #69) et thèmes. + +Le CSS neutre draco-alertes.css attend des variables d'hôte +(--bg-primary, --text-dim, --text-tertiary). Kanbante ne les +définissait pas : le panneau retombait sur ses replis sombres, +illisible en thème clair (retour de Bruno, 2026-10-30). +L'hôte les branche sur ses propres jetons, qui suivent +html[data-theme]. +""" + + +def test_alertes_variables_hote_branchees(client, fake_gitea): + css = client.get("/static/css/style.css").text + assert ".draco-alertes-box {" in css + assert "--bg-primary: var(--surface);" in css + assert "--text-dim: var(--text-2);" in css + assert "--text-tertiary: var(--text-3);" in css + + +def test_alertes_css_neutre_inchange(client, fake_gitea): + # Le fichier partagé n'est pas modifié côté Kanbante : + # il continue de consommer les variables d'hôte. + css = client.get("/static/css/draco-alertes.css").text + assert "background: var(--bg-primary, #1f1f1f);" in css + assert "color: var(--text-dim, #999);" in css