feat(layout): extract NavbarPlaytime as OOB-swappable component

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 21:21:14 +02:00
parent ba1849e80e
commit 7d10884db7
2 changed files with 35 additions and 4 deletions
+15
View File
@@ -0,0 +1,15 @@
from common.layout import NavbarPlaytime
def test_navbar_playtime_has_stable_id_and_values():
html = str(NavbarPlaytime("1 h 00 m", "7 h 00 m"))
assert 'id="navbar-playtime"' in html
assert "1 h 00 m" in html
assert "7 h 00 m" in html
assert "hx-swap-oob" not in html
def test_navbar_playtime_oob_flag():
html = str(NavbarPlaytime("1 h 00 m", "7 h 00 m", oob=True))
assert 'id="navbar-playtime"' in html
assert 'hx-swap-oob="true"' in html