Kanbante 0.45.4 : tests des retours de Bruno — logo officiel, surfaces du board en clair, contrastes (tests/test_logo_et_contrastes.py)

This commit is contained in:
Spark
2026-10-30 11:28:31 -04:00
parent 8449c8ba0c
commit 77f48d8c93
+47
View File
@@ -0,0 +1,47 @@
"""Retours de Bruno (2026-10-30) : logo de la barre latérale,
board en thème clair, badge d'âge illisible en clair.
1. La barre latérale montrait un pictogramme « 3 barres » ;
le logo doit être celui de la barre d'apps commune
(static/img/logos/kanbante.png).
2. En thème clair, les colonnes du board et le panneau Notes
gardaient le fond sombre codé en dur rgba(20,24,34,.72).
3. Le badge d'âge (En vol, Focus) : texte jaune pâle sur
fond jaune translucide — illisible en thème clair.
"""
def test_sidebar_logo_officiel(client, fake_gitea):
page = client.get("/")
assert 'src="/static/img/logos/kanbante.png"' in page.text
# L'ancien pictogramme à barres blanches a disparu.
assert '<rect x="3" y="4" width="5" height="16"' not in page.text
def test_logo_officiel_servi(client, fake_gitea):
r = client.get("/static/img/logos/kanbante.png")
assert r.status_code == 200
assert r.content[:4] == b"\x89PNG"
def test_board_clair_surfaces_eclaircies(client, fake_gitea):
css = client.get("/static/css/style.css").text
assert (
'html[data-theme="light"] .kanban-column '
'{ background: rgba(255, 255, 255, 0.85); }'
) in css
assert (
'html[data-theme="light"] .notes-panel '
'{ background: rgba(255, 255, 255, 0.85); }'
) in css
def test_badge_age_lisible_en_clair(client, fake_gitea):
css = client.get("/static/css/style.css").text
assert 'html[data-theme="light"] .age-badge { color: #b45309; }' in css
assert (
'html[data-theme="light"] .age-badge.stale { color: #dc2626; }'
) in css
assert (
'html[data-theme="light"] .column-count.over { color: #dc2626; }'
) in css