19 lines
542 B
Python
19 lines
542 B
Python
import pytest
|
|
|
|
from src.views import dashboard
|
|
|
|
|
|
@pytest.mark.anyio
|
|
async def test_dashboard_renders_repo_mix_placeholder_before_javascript_runs():
|
|
html = await dashboard()
|
|
server_rendered_html = html.split("<script>", 1)[0]
|
|
|
|
assert '<div class="small" id="repo-mix">Loading…</div>' in server_rendered_html
|
|
|
|
|
|
@pytest.mark.anyio
|
|
async def test_dashboard_marks_fallback_context_as_degraded_instead_of_live():
|
|
html = await dashboard()
|
|
|
|
assert "data.error ? 'Degraded · ' + data.error : 'Live · updated just now'" in html
|