Add GET /kiosk/ambient route and standalone fullscreen template with rotating camera snapshots (crossfade), top bar clock/date, pet status bottom bar, SSE-driven alert takeover with HLS playback, configurable screen dimming, and 6-hour auto-refresh. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30 lines
703 B
Python
30 lines
703 B
Python
import pytest
|
|
from vigilar.config import VigilarConfig
|
|
from vigilar.web.app import create_app
|
|
|
|
|
|
@pytest.fixture
|
|
def kiosk_app():
|
|
cfg = VigilarConfig()
|
|
app = create_app(cfg)
|
|
app.config["TESTING"] = True
|
|
return app
|
|
|
|
|
|
def test_ambient_route_exists(kiosk_app):
|
|
with kiosk_app.test_client() as c:
|
|
rv = c.get("/kiosk/ambient")
|
|
assert rv.status_code == 200
|
|
|
|
|
|
def test_ambient_contains_clock(kiosk_app):
|
|
with kiosk_app.test_client() as c:
|
|
rv = c.get("/kiosk/ambient")
|
|
assert b"clock" in rv.data
|
|
|
|
|
|
def test_ambient_contains_hls(kiosk_app):
|
|
with kiosk_app.test_client() as c:
|
|
rv = c.get("/kiosk/ambient")
|
|
assert b"hls.min.js" in rv.data
|