From 7de6c01b10d0ccf56f5dfaff63c1275af9e9c978 Mon Sep 17 00:00:00 2001 From: Francisco Solla Date: Sun, 23 Aug 2026 21:57:36 -0300 Subject: [PATCH] =?UTF-8?q?fix(e2e):=20C142=20=E2=80=94=20settle=20dossi?= =?UTF-8?q?=C3=AA=20tab=20before=20asserting=20leadership=20link=20in=20ad?= =?UTF-8?q?visor-scopes=20journey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'advisor scopes municipalities' journey casts many steps; the dossiê leadership-list chunk can land after goto settles under 4-worker load, tripping the leadership-link visibility assert. Adds the C106 S: settle before the assert and scopes with .first() against transient duplicates. --- 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 29718d6f..5b8b6750 100644 --- a/tests/e2e/campaignMunicipalities.e2e.spec.ts +++ b/tests/e2e/campaignMunicipalities.e2e.spec.ts @@ -701,7 +701,12 @@ test.describe('Municípios — jornadas por papel', () => { // Staff declare votes on behalf of the leadership. await page.goto(`${campaign.baseURL}/campanha/municipios/${administered.slug}?tab=leaderships`) - await expect(page.getByRole('link', { name: contact.name })).toBeVisible() + // C106 — the dossiê tab streams a transient `S:` shell copy; under load the + // leadership-list chunk can land after `goto` settles, so let the stream + // commit before asserting the leadership link (same class as the `:115` + // editar checkbox and the C142 FAB). + await page.waitForFunction(() => document.querySelectorAll('div[id^="S:"]').length === 0) + await expect(page.getByRole('link', { name: contact.name }).first()).toBeVisible() await page.getByLabel('Quantos votos a liderança traz neste município?').fill('250') await page.getByRole('button', { name: 'Declarar' }).click() await expect(page.getByText('Declaração de votos registrada.')).toBeVisible()