38 lines
1.5 KiB
Python
38 lines
1.5 KiB
Python
"""Tuile Projets et pied de sidebar : ergonomie refondue.
|
|
|
|
Tuile : en-tête groupé, avancement labellisé, jalon étiqueté,
|
|
pied en 2 rangées avec répartition labellisée par colonne.
|
|
Pied : Sortir icône seule, fraîcheur en pastille discrète.
|
|
"""
|
|
|
|
|
|
def test_tuile_structure(client, fake_gitea):
|
|
page = client.get("/")
|
|
assert 'class="card-header-left"' in page.text
|
|
assert 'class="card-header-actions"' in page.text
|
|
assert 'class="foot-main"' in page.text
|
|
assert 'class="foot-dist"' in page.text
|
|
# Répartition, avancement et jalon sont conditionnels (stats /
|
|
# jalon) : on les vérifie dans le gabarit, pas dans la page de
|
|
# test sans données.
|
|
tpl = open("app/templates/dashboard.html", encoding="utf-8").read()
|
|
assert 'aria-label="Répartition par colonne"' in tpl
|
|
assert 'class="progress-head"' in tpl
|
|
assert "Avancement" in tpl
|
|
assert 'class="ms-kicker">Prochain jalon' in tpl
|
|
assert "COLUMN_LABELS[col]" in tpl
|
|
|
|
|
|
def test_pied_sidebar_structure():
|
|
tpl = open("app/templates/_header.html", encoding="utf-8").read()
|
|
assert 'class="side-foot-user"' in tpl
|
|
assert 'class="side-foot-meta"' in tpl
|
|
assert 'class="side-logout logout-icon"' in tpl
|
|
assert 'aria-label="Se déconnecter"' in tpl
|
|
assert " Sortir</span>" not in tpl
|
|
assert 'class="fresh-dot"' in tpl
|
|
css = open("static/css/style.css", encoding="utf-8").read()
|
|
assert ".side-foot-meta" in css
|
|
assert ".fresh-dot" in css
|
|
assert ".logout-icon" in css
|