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:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user