Files
kanbante/tests/test_ux_lot.py
bruno 95b0b219e8
CI / test (push) Failing after 0s
CI / test (pull_request) Failing after 1s
Page Projets : copie URL dans le menu ⋯ + refonte thème barre Fusion/Spark (#44, #45)
2026-10-28 23:40:44 -04:00

51 lines
1.9 KiB
Python

"""Lot UX (#57 à #68) : jetons, boutons, accent-text, icônes,
thème clair sur connexion/wallboard, en-tête de page commun.
"""
def test_tokens_et_accent_text(client, fake_gitea):
css = client.get("/static/css/style.css").text
for token in (
"--accent-text: #14b8a6;",
"--accent-text: #0f766e;",
"--radius-full: 999px;",
"--shadow-lg:",
"--font-xl: 1.55rem;",
):
assert token in css
assert "linear-gradient(135deg, rgba(13,148,136,.9)" not in css
assert '"Inter"' not in css
def test_boutons_et_skeleton(client, fake_gitea):
css = client.get("/static/css/style.css").text
for cls in (".btn-primary", ".btn-danger", ".btn-icon", ".skeleton", ".field-error-msg"):
assert cls in css
def test_cartes_et_labels_lisibles(client, fake_gitea):
css = client.get("/static/css/style.css").text
assert "-webkit-line-clamp: 2" in css
card = open("app/templates/_card.html", encoding="utf-8").read()
assert "pin-btn btn-icon" in card
assert "color-mix(in srgb" in card
assert "📌" not in card
def test_pas_de_recherche_en_double_et_theme_clair_login_wall(client, fake_gitea):
header = open("app/templates/_header.html", encoding="utf-8").read()
assert "topbar-search" not in header
for tpl in ("app/templates/login.html", "app/templates/wall.html"):
assert "kanbante-theme" in open(tpl, encoding="utf-8").read()
css = client.get("/static/css/style.css").text
assert 'html[data-theme="light"] .wall-body' in css
assert 'html[data-theme="light"] .login-body' in css
def test_pages_avec_en_tete_commun(client, fake_gitea):
today = open("app/templates/today.html", encoding="utf-8").read()
focus = open("app/templates/focus.html", encoding="utf-8").read()
assert 'class="page-head"' in today
assert 'class="page-head"' in focus
assert "🌅" not in today