diff --git a/tests/e2e/campaignMunicipalities.e2e.spec.ts b/tests/e2e/campaignMunicipalities.e2e.spec.ts index 1e7ce1c3..f8d12969 100644 --- a/tests/e2e/campaignMunicipalities.e2e.spec.ts +++ b/tests/e2e/campaignMunicipalities.e2e.spec.ts @@ -131,7 +131,9 @@ test.describe('Municípios — jornadas por papel', () => { // B145: assessoria left the detail hero; it still appears on the dossiê tab. await page.goto(`${campaign.baseURL}/campanha/municipios/${municipality.slug}?tab=dossie`) - await expect(page.getByText(`Assessoria: ${advisor.name}`)).toBeVisible() + // `.nth(0)`: same transient hydration duplicate the "Otimista: 5.000" + // assertion pins — the server-composed slot briefly renders twice. + await expect(page.getByText(`Assessoria: ${advisor.name}`).nth(0)).toBeVisible() }) test('coordinator assigns an advisor from the list combobox with auto-save (B27)', async ({ diff --git a/tests/e2e/campaignWebAuthn.e2e.spec.ts b/tests/e2e/campaignWebAuthn.e2e.spec.ts index db6d0b59..8cf2561c 100644 --- a/tests/e2e/campaignWebAuthn.e2e.spec.ts +++ b/tests/e2e/campaignWebAuthn.e2e.spec.ts @@ -74,7 +74,10 @@ test('enrolls a passkey, signs in with it, then revokes it', async ({ await expectCampaignBiometricsReady(page) await page.goto('/campanha/perfil') - await expect(page.getByText('Nenhum aparelho cadastrado ainda.')).toBeVisible() + // `.nth(0)`: during hydration the server-composed slot can briefly coexist + // with its re-rendered copy (same transient duplicate the municipios spec + // pins for "Otimista: 5.000") — the copy settles to one element. + await expect(page.getByText('Nenhum aparelho cadastrado ainda.').nth(0)).toBeVisible() const deviceLabel = page.getByLabel('Nome deste aparelho') await expect(deviceLabel).toBeVisible()