stackchain-dashboard/tests/test_shared_context_snapshot.py
timmy 32d9d9413f
All checks were successful
CI / lint (pull_request) Successful in 15s
CI / build-frontend (pull_request) Successful in 6s
feat: make My Work refresh resumable (#119)
2026-08-06 16:30:01 +00:00

17 lines
625 B
Python

import pytest
from src.views import dashboard
@pytest.mark.anyio
async def test_one_context_snapshot_updates_every_context_backed_panel():
html = await dashboard()
assert '<script src="static/context-poller.js"></script>' in html
assert "createContextPoller({" in html
assert "renderContextSnapshot(data)" in html
assert "renderRepoMix(qs('#repo-mix'), data)" in html
assert "setInterval(tickWidgets, 2000)" not in html
assert "updateRepoMix(qs('#repo-mix'), fetch)" not in html
assert "setInterval(load, 8000)" not in html
assert "document.addEventListener('visibilitychange'" in html