generated from john/python-template
This commit is contained in:
@@ -134,9 +134,27 @@ class TestPeoplePageRendering:
|
||||
assert "Open in FamilySearch" not in response.text
|
||||
assert "FamilySearch ID:" in response.text
|
||||
assert "familysearch.org/tree/person/details/G8T4-MDQ" in response.text
|
||||
assert "Back to People" in response.text
|
||||
assert "New Document" in response.text
|
||||
assert "No linked documents yet." in response.text
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_person_detail_page_renders_document_context_back_button(self, app_client):
|
||||
_, client = app_client
|
||||
|
||||
async with session_scope() as session:
|
||||
person = Person(given_names="Context", last_name="Person")
|
||||
document = Document(name="Context Document")
|
||||
session.add_all([person, document])
|
||||
await session.commit()
|
||||
person_id = str(person.id)
|
||||
document_id = str(document.id)
|
||||
|
||||
response = client.get(f"/ui/people/{person_id}?from=document&document_id={document_id}")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "Back to Document" in response.text
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_person_detail_page_resolves_relative_photo_path(self, app_client):
|
||||
app, client = app_client
|
||||
|
||||
Reference in New Issue
Block a user