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