From 3b0a6afdf49eeebbce148669aa97bc5d08637658 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 2 Aug 2026 01:20:06 +0000 Subject: [PATCH] =?UTF-8?q?B118=20=E2=80=94=20fix=20mobile=20header=20e2e:?= =?UTF-8?q?=20sr-only=20h1=20stays=20a11y-visible=20to=20Playwright?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/e2e/campaignMunicipalities.e2e.spec.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/e2e/campaignMunicipalities.e2e.spec.ts b/tests/e2e/campaignMunicipalities.e2e.spec.ts index 9c99c0ed..d4c07b70 100644 --- a/tests/e2e/campaignMunicipalities.e2e.spec.ts +++ b/tests/e2e/campaignMunicipalities.e2e.spec.ts @@ -50,7 +50,12 @@ test.describe('Municípios — list header mobile (B118)', () => { await campaign.login(page, coordinator.email!, coordinator.password) 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.getByText(/\d+ municípios encontrados/)).toBeVisible() })