from pathlib import Path import pytest from src.views import dashboard @pytest.mark.anyio async def test_dashboard_renders_outside_repository_working_directory(monkeypatch, tmp_path): monkeypatch.chdir(tmp_path) html = await dashboard() assert "Stackchain Dashboard" in html @pytest.mark.anyio async def test_dashboard_viewport_allows_mobile_zoom(): html = await dashboard() assert 'name="viewport"' in html assert "width=device-width" in html assert "user-scalable=no" not in html @pytest.mark.anyio async def test_dashboard_bootstrap_uses_csp_compatible_static_assets(): html = await dashboard() assert '' in html assert '' in html assert "