Kiosk start, offline and setup pages in the InfoFlow display style
CI / test-bookworm (push) Failing after 2s
CI / test-latest (push) Successful in 31s

Dark grey background, name top left, date and clock top right, a flat
panel with a blue top edge. The pages show the kiosk link (token masked)
and the management address; the clock code is shared in kiosk.js.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rothmanandClaude Opus 5.5 committed 2026-11-04 23:13:03 +01:00
1 parent efc581e0ae
commit 19595aaf39
11 files changed
+169 -89

No files matched your search

+9
View File
@@ -169,3 +169,12 @@ def test_devtools_down_is_reported(env):
browser.down = True
agent.tick()
assert json.loads(paths.agent_state_file.read_text())["browser"] == "unreachable"
def test_offline_page_never_receives_the_token(env, paths):
agent, browser, probe, _, _ = env
save_config(paths.config_file, {"url": "https://e.org/scherm?token=geheim123456"})
probe.ok, probe.reason = False, "Time-out"
agent.tick()
assert "offline.html" in browser.url
assert "geheim" not in browser.url and "3456" in browser.url
+9 -1
View File
@@ -1,5 +1,6 @@
import json
from pathlib import Path
from urllib.parse import parse_qs, urlsplit
from voxip_kiosk import browser as b
from voxip_kiosk.config import DEFAULTS
@@ -74,9 +75,16 @@ def test_start_page_url_contains_target(paths):
assert "next=https%3A%2F%2Fe.org%2Fx%3Ftoken%3Dabc" in url and "name=Hal+1" in url
def test_start_page_shows_only_the_masked_link(paths):
url = b.start_page_url(paths, dict(DEFAULTS, url="https://e.org/x?token=geheim123456"))
query = parse_qs(urlsplit(url).query)
assert query["url"] == ["https://e.org/x?token=…3456"]
assert query["admin"][0].endswith(".local:8080")
def test_local_pages_exist():
www = Path(__file__).resolve().parents[1] / "www"
for page in ("start.html", "offline.html", "setup.html", "kiosk.css", "logo.svg"):
for page in ("start.html", "offline.html", "setup.html", "kiosk.css", "kiosk.js"):
assert (www / page).exists()