test(e2e): wizard município sem h1 visível (B107)

This commit is contained in:
Cursor Agent 2026-08-01 18:44:39 +00:00
parent 13a9ccf064
commit ca18ce0f17
No known key found for this signature in database
2 changed files with 16 additions and 5 deletions

View file

@ -122,7 +122,10 @@ test.describe('Início — catálogo de ações (B45)', () => {
await page.getByRole('link', { name: 'Ajustar votos', exact: true }).click()
await page.waitForURL(/\/campanha\/acoes\/atualizar-votos/)
await expect(page.getByRole('heading', { name: WIZARD_MUNICIPALITY_STEP_TITLE })).toBeVisible()
await expect(page.getByLabel('Buscar município')).toBeVisible()
await expect(
page.getByRole('region', { name: WIZARD_MUNICIPALITY_STEP_TITLE }),
).toBeVisible()
await page.goto('/campanha')
await page.getByRole('link', { name: 'Ver esquecidos', exact: true }).click()
@ -167,12 +170,15 @@ test.describe('Wizard — busca município (B60)', () => {
await campaign.login(page, coordinator.email!, coordinator.password)
await page.goto('/campanha/acoes/atualizar-votos')
await expect(page.getByRole('heading', { name: WIZARD_MUNICIPALITY_STEP_TITLE })).toBeVisible()
await expect(page.getByLabel('Buscar município')).toBeVisible()
await expect(
page.getByRole('region', { name: WIZARD_MUNICIPALITY_STEP_TITLE }),
).toBeVisible()
const search = page.getByLabel('Buscar município')
await search.fill(municipality.name)
const results = page.getByRole('region', { name: 'Resultados da busca' })
const results = page.getByRole('region', { name: WIZARD_MUNICIPALITY_STEP_TITLE })
const hit = results.locator(`a[href*="municipio=${municipality.slug}"]`)
await expect(hit).toBeVisible({ timeout: 15000 })
await hit.click()

View file

@ -19,7 +19,11 @@ test.describe('Wizard — header mobile (B75)', () => {
const topBar = page.locator('[data-slot="campaign-mobile-top-bar"][data-mode="wizard"]')
await expect(topBar).toBeVisible()
await expect(topBar.getByText('Ajustar votos', { exact: true })).toBeVisible()
await expect(page.getByRole('heading', { name: WIZARD_MUNICIPALITY_STEP_TITLE })).toBeVisible()
await expect(page.getByRole('heading', { name: WIZARD_MUNICIPALITY_STEP_TITLE })).toHaveCount(0)
await expect(page.getByLabel('Buscar município')).toBeVisible()
await expect(
page.getByRole('region', { name: WIZARD_MUNICIPALITY_STEP_TITLE }),
).toBeVisible()
await expect(page.getByRole('link', { name: 'Sair da ação' })).toBeVisible()
await expect(page.getByRole('link', { name: /Voltar/ })).toHaveCount(0)
@ -55,6 +59,7 @@ test.describe('Wizard — header mobile (B75)', () => {
await page.getByRole('link', { name: /Voltar/ }).click()
await page.waitForURL(/\/campanha\/acoes\/atualizar-votos\/?$/)
await expect(page.getByRole('heading', { name: WIZARD_MUNICIPALITY_STEP_TITLE })).toBeVisible()
await expect(page.getByRole('heading', { name: WIZARD_MUNICIPALITY_STEP_TITLE })).toHaveCount(0)
await expect(page.getByLabel('Buscar município')).toBeVisible()
})
})