From c1bedcf83875cd9275c3d0fdfee2cdec0174a7d7 Mon Sep 17 00:00:00 2001 From: Francisco Solla Date: Sat, 8 Aug 2026 18:29:42 -0300 Subject: [PATCH] =?UTF-8?q?test(campaignMunicipalities):=20torna=20o=20ass?= =?UTF-8?q?ert=20Otimista:=205.000=20determin=C3=ADstico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit O getByText sem índice também casa com o span sr-only do hover-preview quando uma linha está hovered — strict-mode violation flaky no CI. .nth(0) fixa no resumo da célula. --- tests/e2e/campaignMunicipalities.e2e.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/e2e/campaignMunicipalities.e2e.spec.ts b/tests/e2e/campaignMunicipalities.e2e.spec.ts index 126c4897..9461e6d8 100644 --- a/tests/e2e/campaignMunicipalities.e2e.spec.ts +++ b/tests/e2e/campaignMunicipalities.e2e.spec.ts @@ -124,7 +124,10 @@ test.describe('Municípios — jornadas por papel', () => { // (visually a hover-only preview otherwise), so assert against that // unique, unambiguous string rather than a bare "5.000" substring — // that also matches the (opacity-0 but DOM-visible) hover-preview span. - await expect(page.getByText('Otimista: 5.000')).toBeVisible() + // `.nth(0)`: the cell's sr-only summary is first in DOM; the preview span + // duplicates the text when a row is hovered, making a bare getByText a + // strict-mode violation (observed flaky on CI). + await expect(page.getByText('Otimista: 5.000').nth(0)).toBeVisible() // B145: assessoria left the detail hero; it still appears on the dossiê tab. await page.goto(`${campaign.baseURL}/campanha/municipios/${municipality.slug}?tab=dossie`)