test(campaignActivity): fecha o chat antes do passo mobile da agenda (B167)

B167 migra um chat aberto no painel desktop para o drawer full-screen ao
encolher a viewport — o drawer cobriria o calendário no passo mobile deste
spec. Fecha o chat antes do resize para garantir a superfície de teste.
This commit is contained in:
Francisco Solla 2026-08-08 18:11:09 -03:00
parent 0e38d19d42
commit cfb27296f6

View file

@ -125,6 +125,13 @@ test.describe('Agenda — calendário operacional', () => {
)
await expect(page.getByText(title, { exact: true })).toBeVisible()
// B167: when the viewport shrinks to mobile, a chat that was open on the
// desktop panel migrates to the open full-screen drawer — which would cover
// the agenda. Close it first so this mobile-layout step is unobstructed.
await page
.getByRole('button', { name: 'Fechar', exact: true })
.filter({ visible: true })
.click()
await page.setViewportSize({ width: 390, height: 844 })
await page.getByRole('tab', { name: /lista/i }).click()
await expect(page.getByText(title, { exact: true })).toBeVisible()