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:
Francisco Solla 2026-08-10 11:10:46 -03:00
parent 5d38bed12f
commit 2b8213eff6

View file

@ -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()