generated from john/python-template
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
Quality Gate / gate (push) Failing after 2m30s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user