Files
calminer/tests/test_dashboard_route.py

28 lines
940 B
Python

from __future__ import annotations
from fastapi.testclient import TestClient
class TestDashboardRoute:
def test_renders_empty_state(self, client: TestClient) -> None:
response = client.get("/")
assert response.status_code == 200
html = response.text
assert "No recent projects" in html
assert "No simulation runs yet" in html
assert "All scenarios look good" in html
assert "" in html # Last data import placeholder
class TestProjectUIRoutes:
def test_projects_ui_page_resolves(self, client: TestClient) -> None:
response = client.get("/projects/ui")
assert response.status_code == 200
assert "Projects" in response.text
def test_projects_create_form_resolves(self, client: TestClient) -> None:
response = client.get("/projects/create")
assert response.status_code == 200
assert "Create Project" in response.text