V5.0 fixes and revisions
Quality Gate / gate (push) Failing after 11s

This commit is contained in:
Jim Lancaster
2026-08-23 10:32:20 -05:00
parent 86b8e83ff4
commit 0f30d902b9
10 changed files with 492 additions and 102 deletions
+37
View File
@@ -158,6 +158,43 @@ class TestPeoplePageRendering:
assert response.status_code == 200
assert "No source media available for inspection." not in response.text
assert "Edit Photo(s)" in response.text
assert response.text.count("Edit Photo(s)") == 1
assert "Upload photo(s)" not in response.text
@pytest.mark.asyncio
async def test_person_photos_page_renders_photo_management_controls(self, app_client):
app, client = app_client
upload_dirs = {app.state.settings.upload_dir, get_settings().upload_dir}
for upload_dir in upload_dirs:
photo_file = upload_dir / "photos" / "seeded.png"
photo_file.parent.mkdir(parents=True, exist_ok=True)
photo_file.write_bytes(b"portrait")
async with session_scope() as session:
person = Person(full_name="Gallery Person")
session.add(person)
await session.flush()
session.add(
Photo(
person_id=person.id,
path="photos/seeded.png",
is_primary=True,
description="Seeded description",
)
)
await session.commit()
person_id = str(person.id)
response = client.get(f"/ui/people/{person_id}/photos")
assert response.status_code == 200
assert "Edit Photos" in response.text
assert "Upload Photo(s)" in response.text
assert "Back to Person" in response.text
assert "Save Description" in response.text
assert "Delete Photo" in response.text
assert "Set Primary" not in response.text
@pytest.mark.asyncio
async def test_person_detail_page_renders_linked_documents(self, app_client):