Pages: CaMa follow-up and record exports

This commit is contained in:
Roberto Treviño
2026-12-06 00:05:33 -06:00
parent 9bc949edd3
commit 4852d933fa
+13
View File
@@ -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([]);