From b02ff65813c8c5d18152fe37c2a59370abb188a4 Mon Sep 17 00:00:00 2001 From: Frederic Cabassut Date: Mon, 9 Mar 2026 00:39:08 +0100 Subject: [PATCH] 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 --- tests/e2e/organization.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/organization.spec.ts b/tests/e2e/organization.spec.ts index be930f6..fc279eb 100644 --- a/tests/e2e/organization.spec.ts +++ b/tests/e2e/organization.spec.ts @@ -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(); } }); });