From c01a07bd825c9649d051599dae359d370703e708 Mon Sep 17 00:00:00 2001 From: Marcel Date: Thu, 19 Mar 2026 21:48:58 +0100 Subject: [PATCH] =?UTF-8?q?fix(e2e):=20fix=20conversations=20link=20test?= =?UTF-8?q?=20=E2=80=94=20exclude=20/persons/new=20and=20use=20specific=20?= =?UTF-8?q?link=20text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- frontend/e2e/persons.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/e2e/persons.spec.ts b/frontend/e2e/persons.spec.ts index dcc83275..78e43c27 100644 --- a/frontend/e2e/persons.spec.ts +++ b/frontend/e2e/persons.spec.ts @@ -94,11 +94,13 @@ test.describe('Person detail — sort toggle', () => { test.describe('Person detail — conversations link', () => { test('has a conversations link that pre-fills the person', async ({ page }) => { await page.goto('/persons'); - const firstLink = page.locator('a[href^="/persons/"]').first(); + // Exclude /persons/new to avoid matching the "New person" button + const firstLink = page.locator('a[href^="/persons/"]:not([href="/persons/new"])').first(); const href = await firstLink.getAttribute('href'); const personId = href!.split('/persons/')[1]; await firstLink.click(); - const convLink = page.getByRole('link', { name: /Konversationen/i }); + // Use the specific person-detail link text, not the nav "Konversationen" link + const convLink = page.getByRole('link', { name: /Konversationen anzeigen/i }); await expect(convLink).toBeVisible(); await expect(convLink).toHaveAttribute('href', `/conversations?senderId=${personId}`); });