From da2811978d7d3b795ad10aed09608fecb25aa823 Mon Sep 17 00:00:00 2001 From: Francisco Solla Date: Sun, 23 Aug 2026 21:54:40 -0300 Subject: [PATCH] =?UTF-8?q?fix(e2e):=20C142=20=E2=80=94=20harden=20B196=20?= =?UTF-8?q?completion-footer=20assert=20(30s=20poll)=20for=20deploy=20veri?= =?UTF-8?q?fy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The B196 'relation groups' spec asserted the '1 município encontrado' completion footer with the 10s expect default; under 4-worker CI load the RSC list chunk can land late ('element(s) not found'), the same stream-latency class as the issue's three deploy-blocking assertions. Polls the footer with the same 30s budget the sibling geometry asserts use, scoped to .first() so a transient streaming duplicate cannot trip strict mode. --- tests/e2e/campaignMunicipalities.e2e.spec.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/e2e/campaignMunicipalities.e2e.spec.ts b/tests/e2e/campaignMunicipalities.e2e.spec.ts index 13ee86d7..29718d6f 100644 --- a/tests/e2e/campaignMunicipalities.e2e.spec.ts +++ b/tests/e2e/campaignMunicipalities.e2e.spec.ts @@ -1376,8 +1376,13 @@ test.describe('Municípios — barra colada e card denso (B196)', () => { await expect(crowdedCard).toBeVisible() // The completion footer proves the filtered list finished streaming — the // `S:` settle alone can pass while the list still re-renders (measured: - // a mid-stream card can report a transient narrow layout). - await expect(page.getByText('1 município encontrado')).toBeVisible() + // a mid-stream card can report a transient narrow layout). B196 flake + // class: under 4-worker load the footer chunk can land late, so poll with + // the same 30s budget as the geometry asserts below instead of the 10s + // expect default. + await expect + .poll(() => page.getByText('1 município encontrado').first().isVisible(), { timeout: 30_000 }) + .toBe(true) const crowdedRow = crowdedCard.locator('[data-view="relation-avatars"]').first() await expect(crowdedRow.locator('.size-7')).toHaveCount(5) // ONE layout snapshot per read, polled until the settled layout satisfies @@ -1428,7 +1433,11 @@ test.describe('Municípios — barra colada e card denso (B196)', () => { await page.waitForFunction(() => document.querySelectorAll('div[id^="S:"]').length === 0) const sparseCard = cardFor(page, sparse.name) await expect(sparseCard).toBeVisible() - await expect(page.getByText('1 município encontrado')).toBeVisible() + // Same B196 stream-latency flake class as the `crowdedCard` footer above: + // poll the completion footer with the 30s geometry budget. + await expect + .poll(() => page.getByText('1 município encontrado').first().isVisible(), { timeout: 30_000 }) + .toBe(true) const sparseRow = sparseCard.locator('[data-view="relation-avatars"]').first() await expect(sparseRow.locator('.size-7')).toHaveCount(2) await expect