mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 06:43:06 +00:00
test(B193): adapta o e2e C109 do main ao contrato do card novo — rodapé expandível após registrar
O teste C109 (merge do main via rebase) esperava o CTA 'Registrar atualização' sempre visível no card; o card B193 troca o rodapé para a linha expandível 'Última atualização' após o primeiro registro (CTA dentro da expansão). A cobertura da C109 (abrir/registrar/fechar/reabrir + sheet de nível) é mantida.
This commit is contained in:
parent
5d38bed12f
commit
2b8213eff6
1 changed files with 6 additions and 3 deletions
|
|
@ -845,9 +845,12 @@ test.describe('Municípios — cards no celular (B42)', () => {
|
|||
|
||||
// The toast is intentionally transient; the persisted freshness label is
|
||||
// the stable success contract and must arrive after the server response.
|
||||
await expect(
|
||||
card.getByRole('button', { name: `Registrar atualização em ${municipality.name} — hoje` }),
|
||||
).toBeVisible()
|
||||
// B193 — once the município HAS an update, the card footer becomes the
|
||||
// expandable "Última atualização" row (the register CTA lives inside the
|
||||
// expansion), so the freshness contract is asserted on the footer itself.
|
||||
const updateFooter = card.getByRole('button', { name: /^Última atualização/ })
|
||||
await expect(updateFooter).toContainText('hoje')
|
||||
await updateFooter.click()
|
||||
|
||||
// Reopen: the chrome is rebuilt fresh, and the custom footer comes back.
|
||||
await card.getByRole('button', { name: /^Registrar atualização em/ }).click()
|
||||
|
|
|
|||
Loading…
Reference in a new issue