From 4852d933faaa2eb5731de99bdd1e582db729311c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Trevi=C3=B1o?= Date: Sun, 6 Dec 2026 00:05:33 -0600 Subject: [PATCH] Pages: CaMa follow-up and record exports --- e2e/pages.spec.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/e2e/pages.spec.ts b/e2e/pages.spec.ts index da62503..5fa2182 100644 --- a/e2e/pages.spec.ts +++ b/e2e/pages.spec.ts @@ -90,6 +90,19 @@ test("indicators: the KPIs are the API's MeasureReports, every tab and the patie await page.getByRole('option', { name: '12 meses' }).click(); const camaRows = page.locator('table.worklist tbody tr'); await expect(camaRows.first()).toContainText('BI-RADS'); + // the whole list and a record, each as its file + for (const [button, file] of [ + ['Exportar Excel', 'seguimiento-cama.xlsx'], + ['Exportar PDF', 'seguimiento-cama.pdf'], + ]) { + const saved = page.waitForEvent('download'); + await page.getByRole('button', { name: button }).click(); + expect((await saved).suggestedFilename()).toBe(file); + } + await camaRows.first().locator('a').first().click(); + const record = page.waitForEvent('download'); + await page.getByRole('button', { name: 'Exportar PDF' }).click(); + expect((await record).suggestedFilename()).toBe('expediente-cama.pdf'); await page.goto('/indicadores/tea'); await expect(page.getByRole('tab', { name: 'Indicadores' })).toBeVisible(); expect(problems).toEqual([]);