generated from john/python-template
UI style refresh continued
This commit is contained in:
@@ -25,7 +25,7 @@ class TestPeoplePageRendering:
|
||||
assert response.status_code == 200
|
||||
assert "People" in response.text
|
||||
assert "Create new person" in response.text
|
||||
assert "No people yet." in response.text
|
||||
assert "No person records found in repository." in response.text
|
||||
|
||||
def test_people_page_lists_seeded_people(self, app_client):
|
||||
_, client = app_client
|
||||
@@ -41,7 +41,7 @@ class TestPeoplePageRendering:
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "Ada Lovelace" in response.text
|
||||
assert "Display name: Ada" in response.text
|
||||
assert "Ada" in response.text
|
||||
|
||||
def test_person_create_page_renders_fields(self, app_client):
|
||||
_, client = app_client
|
||||
@@ -49,7 +49,7 @@ class TestPeoplePageRendering:
|
||||
response = client.get("/ui/people/new")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "Create person" in response.text
|
||||
assert "Create Person Record" in response.text
|
||||
assert "Full name is required." in response.text
|
||||
assert "Birth date (YYYY-MM-DD)" in response.text
|
||||
assert "Death date (YYYY-MM-DD)" in response.text
|
||||
@@ -85,15 +85,17 @@ class TestPeoplePageRendering:
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "Grace Hopper" in response.text
|
||||
assert "Full name: Grace Hopper" in response.text
|
||||
assert "Display name: Grace" in response.text
|
||||
assert "Maiden name: Murray" in response.text
|
||||
assert "Birth date: 1906-12-09" in response.text
|
||||
assert "Death date: 1992-01-01" in response.text
|
||||
assert "Biography: Computer pioneer" in response.text
|
||||
assert "Portrait path: /images/grace.jpg" in response.text
|
||||
assert "Created at (read-only):" in response.text
|
||||
assert "Updated at (read-only):" in response.text
|
||||
assert "Full Name:" in response.text
|
||||
assert "Display Name:" in response.text
|
||||
assert "Maiden Name:" in response.text
|
||||
assert "Birth Date:" in response.text
|
||||
assert "1906-12-09" in response.text
|
||||
assert "Death Date:" in response.text
|
||||
assert "1992-01-01" in response.text
|
||||
assert "biography" in response.text.lower()
|
||||
assert "Computer pioneer" in response.text
|
||||
assert "Created:" in response.text
|
||||
assert "Updated:" in response.text
|
||||
assert "No linked documents yet." in response.text
|
||||
assert "Link this person from a Document workflow." in response.text
|
||||
|
||||
@@ -115,7 +117,6 @@ class TestPeoplePageRendering:
|
||||
response = client.get(f"/ui/people/{person_id}")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "Portrait path: portraits/person/seeded.png" in response.text
|
||||
assert "/uploads/portraits/person/seeded.png" in response.text
|
||||
|
||||
def test_person_detail_page_renders_linked_documents(self, app_client):
|
||||
@@ -145,7 +146,8 @@ class TestPeoplePageRendering:
|
||||
response = client.get(f"/ui/people/{person_id}")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "Linked Document (author)" in response.text
|
||||
assert "Linked Document" in response.text
|
||||
assert "Role: author" in response.text
|
||||
|
||||
def test_person_detail_page_handles_invalid_id(self, app_client):
|
||||
_, client = app_client
|
||||
@@ -179,7 +181,7 @@ class TestPeoplePageRendering:
|
||||
response = client.get(f"/ui/people/{person_id}/edit")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "Edit person" in response.text
|
||||
assert "Edit Person Record" in response.text
|
||||
assert "Full name is required." in response.text
|
||||
assert "Full name" in response.text
|
||||
assert "Save changes" in response.text
|
||||
@@ -200,8 +202,8 @@ class TestPeoplePageRendering:
|
||||
response = client.get(f"/ui/people/{person_id}/delete")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "Delete person" in response.text
|
||||
assert "This action permanently deletes the person." in response.text
|
||||
assert "Delete Person Record" in response.text
|
||||
assert "This action permanently deletes the person record." in response.text
|
||||
assert "Delete person permanently" in response.text
|
||||
|
||||
def test_person_delete_page_shows_blocked_state_when_linked_documents_exist(self, app_client):
|
||||
|
||||
Reference in New Issue
Block a user