fix: barre d'apps mobile — CSS commune v0.1.2 et rail contextuel (BUG-118, #215)
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
"""BUG-118 — barre d'apps commune en mobile (Fusion ACC-1, #215).
|
||||
|
||||
Retours de Bruno (2026-10-21) sur téléphone : la barre débordait
|
||||
(pastilles domaines et onglets entiers affichés) et son bouton ☰
|
||||
ne faisait rien — il cliquait le bouton bureau
|
||||
``sidebar-toggle-btn`` au lieu du vrai hamburger mobile
|
||||
``hamburger-btn``. Correctifs verrouillés ici : CSS commune v0.1.2
|
||||
(palier 700 px resserré selon la spec) et rail contextuel dans
|
||||
index.html (mobile ≤ 768 px → hamburger-btn).
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
FRONTEND = Path(__file__).resolve().parent.parent / "frontend"
|
||||
|
||||
|
||||
def _css() -> str:
|
||||
return (FRONTEND / "draco-barre.css").read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def _index() -> str:
|
||||
return (FRONTEND / "index.html").read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def test_palier_mobile_resserre_v012():
|
||||
css = _css()
|
||||
assert "@media (max-width: 700px)" in css
|
||||
# Seul l'onglet de l'app courante reste visible en mobile.
|
||||
assert '.draco-bar[data-current="obsigate"] .draco-apptab[data-app="obsigate"]' in css
|
||||
# Domaines et boutons icônes (rail, menu) masqués en mobile.
|
||||
bloc = css.split("@media (max-width: 700px)", 1)[1]
|
||||
assert ".draco-domaines" in bloc
|
||||
assert "display: none" in bloc
|
||||
|
||||
|
||||
def test_rail_mobile_vers_le_vrai_hamburger():
|
||||
html = _index()
|
||||
assert 'matchMedia("(max-width: 768px)")' in html
|
||||
assert '"hamburger-btn"' in html
|
||||
assert '"sidebar-toggle-btn"' in html
|
||||
Reference in New Issue
Block a user