From cbe2a12f7c025ff02befb72945113859426217c5 Mon Sep 17 00:00:00 2001 From: Frederic Cabassut Date: Thu, 5 Mar 2026 21:26:54 +0100 Subject: [PATCH] fix: flaky search e2e test due to duplicate title across test suites Use a unique title "Grocery Errands" instead of "Shopping List" which collided with the checklist test suite in the shared test database. Co-Authored-By: Claude Opus 4.6 --- tests/e2e/search.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/e2e/search.spec.ts b/tests/e2e/search.spec.ts index d90e5a5..6eb8f8e 100644 --- a/tests/e2e/search.spec.ts +++ b/tests/e2e/search.spec.ts @@ -2,21 +2,21 @@ import { test, expect } from './helpers/fixtures.js'; test.describe('Search', () => { test('Scenario: Searching by title returns the matching note', async ({ authenticatedPage: page }) => { - // Given a note titled "Shopping List" and a note titled "Work Meeting" exist + // Given a note titled "Grocery Errands" and a note titled "Work Meeting" exist await page.getByTestId('new-note-btn').click(); - await page.getByTestId('note-title-input').fill('Shopping List'); + await page.getByTestId('note-title-input').fill('Grocery Errands'); await page.getByTestId('close-editor-btn').click(); await page.getByTestId('new-note-btn').click(); await page.getByTestId('note-title-input').fill('Work Meeting'); await page.getByTestId('close-editor-btn').click(); - // When the user searches for "Shopping" - await page.getByTestId('search-input').fill('Shopping'); + // When the user searches for "Grocery" + await page.getByTestId('search-input').fill('Grocery'); await page.waitForTimeout(500); - // Then "Shopping List" is visible in the results - await expect(page.getByText('Shopping List')).toBeVisible(); + // Then "Grocery Errands" is visible in the results + await expect(page.getByText('Grocery Errands')).toBeVisible(); }); test('Scenario: Searching by content returns the matching note', async ({ authenticatedPage: page }) => {