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:
Frederic Cabassut
2026-03-09 01:10:37 +01:00
committed by Fred Cabassut
co-authored by Claude Opus 4.6
parent 3e1e01c539
commit 80c6744559
+2 -2
View File
@@ -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();
}
});
});