diff --git a/frontend/e2e/persons.spec.ts b/frontend/e2e/persons.spec.ts index 3a0e215c..3fd78387 100644 --- a/frontend/e2e/persons.spec.ts +++ b/frontend/e2e/persons.spec.ts @@ -95,6 +95,21 @@ test.describe('New person', () => { }); }); +test.describe('Person creation', () => { + test('user fills in first and last name and lands on the new person detail page', async ({ + page + }) => { + await page.goto('/persons/new'); + await page.getByLabel('Vorname').fill('E2E'); + await page.getByLabel('Nachname').fill('Testperson'); + await page.getByRole('button', { name: /Erstellen/i }).click(); + + await expect(page).toHaveURL(/\/persons\/[^/]+$/); + await expect(page.getByText('E2E Testperson')).toBeVisible(); + await page.screenshot({ path: 'test-results/e2e/person-create.png' }); + }); +}); + test.describe('Person detail — sort toggle', () => { test('each section has its own sort toggle that works independently', async ({ page }) => { await page.goto('/persons');