UI refinement: Back buttons
Quality Gate / gate (push) Failing after 49s

This commit is contained in:
Jim Lancaster
2026-08-24 12:44:02 -05:00
parent f15c9834e4
commit 9a7970c533
12 changed files with 129 additions and 13 deletions
+30
View File
@@ -153,6 +153,36 @@ class TestDocumentsPageRendering:
assert "1924-07-04" not in response.text
assert "PIPELINE JOBS" in response.text.upper()
assert "Edit Document" in response.text
assert "Back to Documents" in response.text
@pytest.mark.asyncio
async def test_document_detail_page_renders_person_context_back_button(self, app_client, seed_person_and_document):
_, client = app_client
doc_id, person_id = seed_person_and_document
response = client.get(f"/ui/documents/{doc_id}?from=person&person_id={person_id}")
assert response.status_code == 200
assert "Back to Person" in response.text
@pytest.mark.asyncio
async def test_document_detail_page_renders_job_context_back_button(self, app_client):
_, client = app_client
async with session_scope() as session:
doc = Document(name="Job-linked Document")
session.add(doc)
await session.flush()
job = Job(document_id=doc.id)
session.add(job)
await session.commit()
doc_id = str(doc.id)
job_id = str(job.id)
response = client.get(f"/ui/documents/{doc_id}?from=job&job_id={job_id}")
assert response.status_code == 200
assert "Back to Job" in response.text
@pytest.mark.asyncio
async def test_document_jobs_page_redirects_to_filtered_jobs(self, app_client):