Files
kanbante/tests/test_mobile.py
bruno d0ba39bf01
CI / test (push) Failing after 0s
CI / test (pull_request) Failing after 0s
Page Projets : copie URL dans le menu ⋯ + refonte thème barre Fusion/Spark (#44, #45)
2026-10-29 12:27:53 -04:00

36 lines
1.4 KiB
Python

"""Mobile : tiroir, pied et menu compte.
Bugs signalés sur captures (29 octobre 2026) :
- tiroir rétréci à 68 px en mobile quand l'état « replié » desktop
était mémorisé (spécificité de `body.sidebar-collapsed .sidebar`) ;
- pied de sidebar masqué en mobile (`display: none`) ;
- Profil / Déconnexion du menu compte draco sans effet (onAction
ne les prenait pas en charge).
"""
def test_tiroir_mobile_largeur_fixe():
css = open("static/css/style.css", encoding="utf-8").read()
assert "body.sidebar-collapsed .sidebar,\n body.sidebar-open.sidebar-collapsed .sidebar { width: 264px; }" in css
assert "body.sidebar-open { overflow: hidden; }" in css
def test_pied_visible_en_mobile():
css = open("static/css/style.css", encoding="utf-8").read()
assert ".side-foot { display: none; }" not in css
assert "body.sidebar-collapsed .side-foot-meta { display: flex; }" in css
def test_menu_compte_draco_fonctionnel():
tpl = open("app/templates/_draco_bar.html", encoding="utf-8").read()
assert 'act === "profil"' in tpl
assert 'location.href = "/profile"' in tpl
assert 'act === "deconnexion"' in tpl
assert 'location.href = "/logout"' in tpl
def test_tiroir_ferme_en_mobile():
js = open("static/js/nav.js", encoding="utf-8").read()
assert "window.innerWidth <= 900" in js
assert "querySelectorAll('.side-link')" in js