From 51fc9298aa2d799e95394adf0ffed24c2e7f2554 Mon Sep 17 00:00:00 2001 From: lucaronin Date: Thu, 19 Mar 2026 10:41:04 +0100 Subject: [PATCH] fix: update smoke tests to find Changes badge in secondary sidebar area The Changes NavItem moved from the top nav to the sidebar-secondary area, so Playwright locators need to scope within the new data-testid. Co-Authored-By: Claude Opus 4.6 (1M context) --- tests/smoke/trash-archive-ui-consistency.spec.ts | 3 ++- tests/smoke/trashed-archived-not-saved.spec.ts | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/smoke/trash-archive-ui-consistency.spec.ts b/tests/smoke/trash-archive-ui-consistency.spec.ts index 821d8d2d..3b00a7dd 100644 --- a/tests/smoke/trash-archive-ui-consistency.spec.ts +++ b/tests/smoke/trash-archive-ui-consistency.spec.ts @@ -75,7 +75,8 @@ test.describe('Trash/archive state consistency across UI', () => { test('Changes list updates after trashing a note', async ({ page }) => { const sidebar = page.locator('.app__sidebar') - const changesRow = sidebar.locator('div', { hasText: /^Changes/ }).first() + const secondaryArea = sidebar.locator('[data-testid="sidebar-secondary"]') + const changesRow = secondaryArea.locator('div', { hasText: /^Changes/ }).first() await changesRow.waitFor({ timeout: 5000 }) const badge = changesRow.locator('span').last() diff --git a/tests/smoke/trashed-archived-not-saved.spec.ts b/tests/smoke/trashed-archived-not-saved.spec.ts index 3931bb50..3426f1a9 100644 --- a/tests/smoke/trashed-archived-not-saved.spec.ts +++ b/tests/smoke/trashed-archived-not-saved.spec.ts @@ -10,8 +10,9 @@ test.describe('Trash/archive notes appear in Changes', () => { test('trashing a note increments the Changes badge', async ({ page }) => { const sidebar = page.locator('.app__sidebar') - // Wait for Changes nav item (mock starts with 3 modified files) - const changesRow = sidebar.locator('div', { hasText: /^Changes/ }).first() + // Wait for Changes nav item in the secondary bottom area (mock starts with 3 modified files) + const secondaryArea = sidebar.locator('[data-testid="sidebar-secondary"]') + const changesRow = secondaryArea.locator('div', { hasText: /^Changes/ }).first() await changesRow.waitFor({ timeout: 5000 }) // Read the initial badge count from the Changes row