Merge parity/F1c

# Conflicts:
#	src/app/indicadores/tea-indicators.spec.ts
This commit is contained in:
2026-12-01 11:51:57 -06:00
11 changed files with 687 additions and 242 deletions
+30 -7
View File
@@ -34,6 +34,18 @@ test('tea indicators: every tab loads, and the follow-up list exports to Excel',
await page.getByRole('tab', { name: 'Seguimiento' }).click();
const rows = page.locator('app-tab-seguimiento-tea table tbody tr');
await expect(rows.first().locator('td').first()).toHaveText(/^N-?\d{4}$/);
await expect(rows.first().locator('app-tea-stepper li')).toHaveCount(4);
await expect(page.locator('app-tab-seguimiento-tea').getByRole('columnheader')).toHaveText([
'Expediente',
'Nombre',
'Sexo',
'Edad (meses)',
'Etapa',
'Puntaje M-CHAT',
'CSS ADOS-2',
'Estatus de EEG',
'Alteraciones encontradas',
]);
const name = await downloaded(
page,
page.getByRole('button', { name: 'Exportar a Excel' }),
@@ -49,6 +61,18 @@ test('tea indicators: every tab loads, and the follow-up list exports to Excel',
await expect(risk.locator('table.worklist tbody tr').first().locator('td').first()).toHaveText(
/^N-?\d{4}$/,
);
await expect(risk.locator('table.worklist > thead').getByRole('columnheader')).toHaveText([
'Expediente',
'Nombre',
'Sexo',
'Edad (meses)',
'Asociación principal',
'Razón de momios',
'IC 95 %',
'q',
'Probabilidad',
'Probabilidad de referencia',
]);
await risk.getByRole('combobox', { name: 'Modelo de asociación' }).click();
await page.getByRole('option', { name: 'Con resultados' }).click();
await expect(risk.getByText('No hay registros para los filtros aplicados.')).toBeVisible();
@@ -74,7 +98,10 @@ test('tea patient: the record and the risk page load and export to PDF', async (
await expect(page).toHaveURL(/\/indicadores\/tea\/pacientes\/[^/]+$/);
await expect(page.getByRole('heading', { level: 1 })).toBeVisible();
await expect(page.locator('app-tea-section').first()).toBeVisible();
const timeline = page.locator('app-tea-section').first();
await expect(timeline.getByText('Línea del tiempo', { exact: true })).toBeVisible();
await expect(timeline.locator('app-plot .scatterlayer .point').first()).toBeVisible();
await expect(timeline.getByRole('table')).toHaveCount(0);
const record = await downloaded(page, page.getByRole('button', { name: 'Exportar PDF' }), 'pdf');
expect(record).toMatch(/^tea-seguimiento-/);
@@ -83,12 +110,8 @@ test('tea patient: the record and the risk page load and export to PDF', async (
await expect(focused.getByRole('button', { name: 'Ver todos los pacientes' })).toBeVisible();
const focusedRows = focused.locator('table tbody tr');
await expect(focusedRows).toHaveCount(1);
await expect(focusedRows.first().locator('td').nth(4)).toHaveText(
/M-CHAT|Psicología|Neuropediatría|EEG/,
);
await expect(focusedRows.first().locator('td').nth(5)).toHaveText(
/Diagnóstico confirmado|En proceso|Sin TEA/,
);
await expect(focusedRows.first().locator('td')).toHaveCount(9);
await expect(focusedRows.first().locator('app-tea-stepper')).toBeVisible();
await focusedRows.first().getByRole('link').click();
await page.getByRole('link', { name: 'Análisis de riesgo' }).click();