fix(e2e): fix conversations link test — exclude /persons/new and use specific link text
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 9h3m35s
CI / Backend Unit Tests (pull_request) Successful in 3m51s
CI / E2E Tests (pull_request) Failing after 17m8s
CI / Unit & Component Tests (push) Successful in 1m52s
CI / Backend Unit Tests (push) Successful in 2m3s
CI / E2E Tests (push) Failing after 16m23s
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 9h3m35s
CI / Backend Unit Tests (pull_request) Successful in 3m51s
CI / E2E Tests (pull_request) Failing after 17m8s
CI / Unit & Component Tests (push) Successful in 1m52s
CI / Backend Unit Tests (push) Successful in 2m3s
CI / E2E Tests (push) Failing after 16m23s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit was merged in pull request #26.
This commit is contained in:
@@ -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}`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user