Revamped the Documents, People, & Jobs too.

This commit is contained in:
Jim Lancaster
2026-08-05 13:05:41 -05:00
parent 72bc96ab3a
commit fd3ca60008
15 changed files with 1719 additions and 1338 deletions
+43
View File
@@ -0,0 +1,43 @@
"""Tests for UI entry-points, redirects, and page mounting health-checks."""
import pytest
@pytest.mark.integration
class TestNavigationAndMounts:
"""Verify application entry-point redirects and route mounting."""
@pytest.mark.parametrize(
("url", "expected_status", "expected_redirect"),
[
("/", 307, "/ui/homepage"),
("/ui", 307, "/ui/homepage"),
("/ui/upload", 307, "/ui/jobs/new"),
],
)
def test_entrypoint_redirects(self, app_client, url: str, expected_status: int, expected_redirect: str):
"""Verify root and legacy routes redirect to primary UI views."""
_, client = app_client
response = client.get(url, follow_redirects=False)
assert response.status_code == expected_status
assert response.headers["location"] == expected_redirect
@pytest.mark.parametrize(
"route_path",
[
"/ui/homepage",
"/ui/homepage/edit",
"/ui/documents",
"/ui/people",
"/ui/sources",
"/ui/jobs",
],
)
def test_registered_pages_render_successfully(self, app_client, route_path: str):
"""Smoke test verifying all primary UI routes respond with 200 OK."""
_, client = app_client
response = client.get(route_path)
assert response.status_code == 200
assert "html" in response.headers.get("content-type", "").lower()