Kanbante 0.45.11 : barre v0.4.0 — icônes monoline du menu compte, vendange verbatim (HUB-11) + tests + version/changelog
CI / test (pull_request) Failing after 2s
CI / test (push) Failing after 2m37s

This commit is contained in:
Spark
2026-11-05 05:09:06 +00:00
parent bd84628ba3
commit 6ccd4adaa5
6 changed files with 148 additions and 3 deletions
+52
View File
@@ -0,0 +1,52 @@
"""Barre commune v0.4.0 (HUB-11, fusion #125) — re-vendange 0.45.11.
- CSS/JS vendangés VERBATIM depuis dracodev-commons, branche
menu-compte-icones-v0-4-0 (PR commons #10), ui/barre-apps/.
- Menu compte : chaque item (Télécharger, À Propos, Aides,
Profil, Déconnexion) porte une icône SVG monoline construite
en DOM (contour, currentColor, sans remplissage), dans le
style des icônes du rail de la console — aucun emoji.
L'en-tête d'identité reste sans icône ; les liens Hub et le
relais « Déconnexion » sont inchangés depuis la v0.3.0.
"""
import hashlib
from pathlib import Path
R = Path(__file__).resolve().parents[1]
# Empreintes SHA-256 de la source commons v0.4.0
# (Projets/dracodev-commons, ui/barre-apps/, branche
# menu-compte-icones-v0-4-0 @e8ca99a).
SHA256_CSS_V040 = "d8cf53b2f6700ebc7499d43869d5cae256d1f74636f0113bffb174b8a6bd06ec"
SHA256_JS_V040 = "36cc24b2bfea757633a7cbcfded54fb73405d9f6fdbde1b4a8fb8df7ae5d39a0"
def _sha256(chemin):
return hashlib.sha256((R / chemin).read_bytes()).hexdigest()
def test_barre_css_js_verbatim_commons_v040():
assert _sha256("static/css/draco-barre.css") == SHA256_CSS_V040
assert _sha256("static/js/draco-barre.js") == SHA256_JS_V040
def test_js_icones_monoline_menu_compte():
js = (R / "static/js/draco-barre.js").read_text(encoding="utf-8")
assert "MENU_ICONES" in js
for nom in ("telecharger", "a-propos", "aide", "profil", "deconnexion"):
assert f'"{nom}"' in js
assert "draco-menu-icone" in js
assert 'setAttribute("stroke", "currentColor")' in js
assert 'setAttribute("fill", "none")' in js
# Comportements v0.3.0 conservés.
assert 'hub: "https://hub.dracodev.net/"' in js
assert '"profil", "Profil"' in js
assert 'data-compte-act", "deconnexion"' in js
def test_css_icone_menu_compte():
css = (R / "static/css/draco-barre.css").read_text(encoding="utf-8")
assert ".draco-menu-icone" in css
bloc = css.split(".draco-menu-icone {", 1)[1].split("}", 1)[0]
assert "width: 18px" in bloc
assert "var(--ink-2)" in bloc