UI updates, changes sync'd to UI docs

This commit is contained in:
Jim Lancaster
2026-08-02 18:20:38 -05:00
parent 9653060c2a
commit 0ab7ad50f2
22 changed files with 447 additions and 431 deletions
+30 -6
View File
@@ -29,7 +29,28 @@ class TestDocumentsPageRendering:
assert response.status_code == 200
assert "Documents" in response.text
assert "Create new document" in response.text
assert "No documents yet." in response.text
assert "Create your first document" in response.text
def test_document_create_page_renders_fields(self, app_client):
"""GET /ui/documents/new renders document-create form fields."""
_, client = app_client
response = client.get("/ui/documents/new")
assert response.status_code == 200
assert "Create document" in response.text
assert "Document name is required." in response.text
assert "Document name" in response.text
assert "Document type" in response.text
assert "Author (Person)" in response.text
assert "Exact date (YYYY-MM-DD)" in response.text
assert "Approximate date" in response.text
assert "Document location" in response.text
assert "Archive identifier" in response.text
assert "Notes" in response.text
assert "Save document" in response.text
def test_documents_page_lists_seeded_documents(self, app_client):
"""GET /ui/documents lists seeded document cards."""
@@ -75,6 +96,7 @@ class TestDocumentsPageRendering:
assert response.status_code == 200
assert "Zenna Letter" in response.text
assert "Document type: letter" in response.text
assert "Author: not set" in response.text
assert "Exact date: 1885-07-13" in response.text
assert "Approximate date: c. 1885" in response.text
assert "Location created: Ohio" in response.text
@@ -83,12 +105,12 @@ class TestDocumentsPageRendering:
assert "Created at (read-only):" in response.text
assert "Updated at (read-only):" in response.text
assert "No linked people yet." in response.text
assert "No sources added yet." in response.text
assert "No jobs created yet." in response.text
assert "0 source(s) linked" in response.text
assert "0 job(s) linked" in response.text
assert "Add sources" in response.text
assert "Create job" in response.text
assert "View sources" in response.text
assert "View jobs" in response.text
assert "Sources" in response.text
assert "Jobs" in response.text
assert "Edit document" in response.text
assert "Delete document" in response.text
@@ -135,8 +157,9 @@ class TestDocumentsPageRendering:
assert response.status_code == 200
assert "Jane Doe (author)" in response.text
assert "Page 1: 001_page.png" in response.text
assert "queued -" in response.text
assert "Author: Jane Doe" in response.text
assert "1 source(s) linked" in response.text
assert "1 job(s) linked" in response.text
def test_document_jobs_page_filters_to_document_context(self, app_client):
_, client = app_client
@@ -245,6 +268,7 @@ class TestDocumentsPageRendering:
assert "Document name and document type are required." in response.text
assert "Document name" in response.text
assert "Document type" in response.text
assert "Author (Person)" in response.text
assert "Exact date (YYYY-MM-DD)" in response.text
assert "Approximate date" in response.text
assert "Document location" in response.text