Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions web/e2e/a11y-audit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ type AxePageReport = {
}>
}

// The e2e fixture data is fixed in 2026-09; a rolling default period would
// lose it (and the world map) as the calendar moves on.
const fixtureRange = '?period=custom&from=2026-09-28&to=2026-09-30'

const emptyCounts = (): ImpactCounts => ({ critical: 0, serious: 0, moderate: 0, minor: 0 })

async function waitForDashboard(page: Page) {
Expand Down Expand Up @@ -113,15 +117,15 @@ test('reports axe findings for the requested pages', async ({ page, owner }) =>
reports.push(await audit(page, 'login'))

const dashboard = `/app/${owner.orgSlug}/${owner.siteSlug}`
await owner.login(page, dashboard)
await owner.login(page, dashboard + fixtureRange)
await waitForDashboard(page)
reports.push(await audit(page, 'dashboard'))
await page.getByRole('button', { name: 'Open command palette' }).click()
await expect(page.getByRole('dialog', { name: 'Command palette' })).toBeVisible()
reports.push(await audit(page, 'command-palette'))
await page.keyboard.press('Escape')

await page.goto(`${dashboard}/sessions`)
await page.goto(`${dashboard}/sessions${fixtureRange}`)
await waitForSessions(page)
reports.push(await audit(page, 'sessions'))

Expand Down Expand Up @@ -234,8 +238,8 @@ test('the first dashboard Tab offers a skip link that focuses the sole main land
mkdirSync(screenshotDir, { recursive: true })
const dashboard = `/app/${owner.orgSlug}/${owner.siteSlug}`
await page.setViewportSize({ width: 1440, height: 1_000 })
await owner.login(page, dashboard)
await page.goto(dashboard)
await owner.login(page, dashboard + fixtureRange)
await page.goto(dashboard + fixtureRange)
await waitForDashboard(page)

const skipLink = page.getByRole('link', { name: 'Skip to main content' })
Expand All @@ -253,7 +257,7 @@ test('captures the dashboard and grouped sidebar at the requested breakpoints',
mkdirSync(screenshotDir, { recursive: true })
const dashboard = `/app/${owner.orgSlug}/${owner.siteSlug}`
await page.setViewportSize({ width: 1440, height: 1000 })
await owner.login(page, dashboard)
await owner.login(page, dashboard + fixtureRange)
await waitForDashboard(page)

for (const name of ['Analyze', 'Behaviour', 'Conversion', 'Manage', 'Settings']) {
Expand Down
Loading