mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-26 21:53:06 +00:00
B118 — fix mobile header e2e: sr-only h1 stays a11y-visible to Playwright
This commit is contained in:
parent
96d20ae8b2
commit
3b0a6afdf4
1 changed files with 6 additions and 1 deletions
|
|
@ -50,7 +50,12 @@ test.describe('Municípios — list header mobile (B118)', () => {
|
||||||
|
|
||||||
await campaign.login(page, coordinator.email!, coordinator.password)
|
await campaign.login(page, coordinator.email!, coordinator.password)
|
||||||
await page.goto(`${campaign.baseURL}/campanha/municipios`)
|
await page.goto(`${campaign.baseURL}/campanha/municipios`)
|
||||||
await expect(page.getByRole('heading', { name: 'Municípios', exact: true })).toBeHidden()
|
const heading = page.getByRole('heading', { name: 'Municípios', exact: true })
|
||||||
|
await expect(heading).toHaveClass(/sr-only/)
|
||||||
|
const headingBox = await heading.boundingBox()
|
||||||
|
expect(headingBox?.height ?? 0).toBeLessThanOrEqual(2)
|
||||||
|
await expect(page.locator('header p')).toBeHidden()
|
||||||
|
await expect(page.locator('[data-scope="campaign"]')).toBeHidden()
|
||||||
await expect(page.getByLabel('Buscar município')).toBeVisible()
|
await expect(page.getByLabel('Buscar município')).toBeVisible()
|
||||||
await expect(page.getByText(/\d+ municípios encontrados/)).toBeVisible()
|
await expect(page.getByText(/\d+ municípios encontrados/)).toBeVisible()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue