mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 06:43:06 +00:00
test(campaignMunicipalities): torna o assert Otimista: 5.000 determinístico
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.
This commit is contained in:
parent
cfb27296f6
commit
c1bedcf838
1 changed files with 4 additions and 1 deletions
|
|
@ -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`)
|
||||
|
|
|
|||
Loading…
Reference in a new issue