V6.1 refinements - add link to source image gallery on Document detail page. Fix Maintenance tab actions (again).
Quality Gate / gate (push) Failing after 2m30s

This commit is contained in:
Jim Lancaster
2026-09-01 13:32:46 -05:00
parent 9b6bb9ae66
commit 32b6b5f29a
4 changed files with 183 additions and 60 deletions
+28
View File
@@ -250,6 +250,34 @@ class TestDocumentsPageRendering:
assert "Create job" not in response.text
assert "Refresh" not in response.text
@pytest.mark.asyncio
async def test_document_sources_page_renders_thumbnail_gallery(self, app_client):
_, client = app_client
async with session_scope() as session:
doc = Document(name="Doc With Sources")
session.add(doc)
await session.flush()
source = Source(
document_id=doc.id,
page_number=1,
upload_name="scan-01.jpg",
filename="scan-01.jpg",
file_path="documents/sample/scan-01.jpg",
file_hash="c" * 64,
file_size_bytes=1,
)
session.add(source)
await session.commit()
doc_id = str(doc.id)
response = client.get(f"/ui/documents/{doc_id}/sources")
assert response.status_code == 200
assert "Source Images" in response.text
assert "Open Source Detail" in response.text
assert "scan-01.jpg" in response.text
@pytest.mark.asyncio
async def test_document_edit_page_prefills_existing_values(self, app_client, seed_person_and_document):
_, client = app_client