stackchain-dashboard/tests/test_today_session_handoff_ui.py
timmy 25dda21811
All checks were successful
CI / lint (pull_request) Successful in 2m58s
CI / build-release (pull_request) Successful in 6s
CI / browser-journey (pull_request) Successful in 2m17s
CI / release-candidate (pull_request) Has been skipped
fix: converge Today session conflicts across devices (Closes #1030)
2026-08-17 16:00:59 +00:00

28 lines
1.1 KiB
Python

from pathlib import Path
from src.frontend_bundle import build_frontend
ROOT = Path(__file__).parents[1]
def test_dashboard_packages_a_mobile_today_session_handoff():
build = build_frontend(ROOT / "frontend")
html = build.dashboard_html
dashboard = (ROOT / "frontend" / "dashboard.js").read_text()
css = (ROOT / "frontend" / "dashboard.css").read_text()
today_bundle = build.feature_bundles["today-timer"].runtime_bytes.decode()
assert 'id="today-session-handoff"' in html
assert 'id="continue-today-session"' in html
assert 'id="today-session-sync-status"' in html
assert 'aria-live="polite"' in html
assert "createTodaySessionSync" in today_bundle
assert "attachTodaySessionHandoff" in today_bundle
assert "Session syncing…" in today_bundle
assert "Session offline · will retry." in today_bundle
assert "Session continued on another device." in today_bundle
assert "todaySessionSync = attachTodaySessionHandoff" in dashboard
assert "todaySessionSync?.publish(snapshot)" in dashboard
assert "min-height:44px" in css