mirror of
https://github.com/bretzel-app/crumbs.git
synced 2026-10-12 20:06:57 +02:00
fix(test): resolve strict mode violations in e2e organization tests
Use .first() for pin-btn and tag filter assertions to handle cases where multiple matching elements exist in the DOM. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
Fred Cabassut
co-authored by
Claude Opus 4.6
parent
506e6b9c87
commit
b02ff65813
@@ -10,7 +10,7 @@ test.describe('Organization Features', () => {
|
||||
// When the user pins the note
|
||||
const pinCard = noteCard(page, 'Pin Me');
|
||||
await pinCard.hover();
|
||||
await pinCard.getByTestId('pin-btn').click({ force: true });
|
||||
await pinCard.getByTestId('pin-btn').first().click({ force: true });
|
||||
|
||||
// Then the "Pinned" section is visible
|
||||
await expect(page.getByText('Pinned')).toBeVisible();
|
||||
@@ -64,7 +64,7 @@ test.describe('Organization Features', () => {
|
||||
await tagChip.click();
|
||||
|
||||
// Then only the tagged note is visible
|
||||
await expect(page.getByText('Tagged Note')).toBeVisible();
|
||||
await expect(page.getByText('Tagged Note').first()).toBeVisible();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user