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) <noreply@anthropic.com>
This commit is contained in:
Test
2026-03-19 10:41:04 +01:00
parent a369b3d93e
commit 99aee0f67b
2 changed files with 5 additions and 3 deletions

View File

@@ -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()

View File

@@ -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