F1h: Gobernanza without Vista previa and Subir archivos, button spacing
Keep preview state in Modelos and reset the toggle on domain changes. Hide the form while collapsed so the current selections, run monitor and result dialog survive toggling. Keep the existing evaluation and PDF handlers. Use one wrapping button-row class with space-3 gaps and block margins. Inside table cells use the existing cell padding between rows. Apply the same class to the indicators export and keep the existing domain navigation bottom margin. Delete the training upload UI and hand-edit the client and OpenAPI. Preserve the generator format and update the Modelos component spec and Gobernanza page case to cover both toggle states.
This commit is contained in:
+24
-19
@@ -149,16 +149,11 @@ test('tea gobernanza: every section in sync mode, and the preview saved as PDF',
|
||||
'Ejecución',
|
||||
'Modelos',
|
||||
'Entrenamiento',
|
||||
'Subir archivos',
|
||||
'Bundles',
|
||||
'Estudios EEG',
|
||||
]);
|
||||
await expect(page.locator('app-eeg-preview')).toHaveCount(0);
|
||||
await expect(page.getByRole('heading', { name: 'Subir archivos', exact: true })).toHaveCount(0);
|
||||
await expect(page.getByText('Archivos de entrenamiento', { exact: true })).toHaveCount(0);
|
||||
const uploads = page.getByRole('region', { name: 'Subir archivos' });
|
||||
await expect(uploads.getByLabel('Conjunto')).toBeVisible();
|
||||
await expect(uploads.getByRole('button', { name: 'Archivos', exact: true })).toBeVisible();
|
||||
await expect(uploads.getByRole('button', { name: 'Subir archivos' })).toBeDisabled();
|
||||
await page.getByRole('combobox', { name: 'Modo' }).click();
|
||||
await page.getByRole('option', { name: 'Sync' }).click();
|
||||
await expect(page.getByRole('status').filter({ hasText: 'Disponible' })).toBeVisible();
|
||||
@@ -205,14 +200,28 @@ test('tea gobernanza: every section in sync mode, and the preview saved as PDF',
|
||||
{ timeout: 10 * 60_000 },
|
||||
);
|
||||
|
||||
await page
|
||||
.locator('app-governance-models')
|
||||
.getByRole('button', {
|
||||
name: 'Evaluar un solo estudio',
|
||||
})
|
||||
.click();
|
||||
const preview = page.locator('app-eeg-preview');
|
||||
await expect(preview.getByRole('heading', { name: 'Vista previa' })).toBeVisible();
|
||||
const models = page.getByRole('region', { name: 'Modelos' });
|
||||
const toggle = models.getByRole('button', { name: 'Evaluar un solo estudio' });
|
||||
const preview = models.locator('.button-row + app-eeg-preview');
|
||||
const edf = preview.getByRole('button', { name: 'EDF', exact: true });
|
||||
const ados = preview.getByRole('button', { name: 'ADOS-2 (PDF)', exact: true });
|
||||
const birth = preview.getByLabel('Fecha de nacimiento');
|
||||
await expect(toggle).toHaveAttribute('aria-pressed', 'false');
|
||||
await expect(edf).toBeHidden();
|
||||
await expect(ados).toBeHidden();
|
||||
await expect(birth).toBeHidden();
|
||||
await toggle.click();
|
||||
await expect(toggle).toHaveAttribute('aria-pressed', 'true');
|
||||
await expect(page.getByRole('heading', { name: 'Vista previa', exact: true })).toHaveCount(0);
|
||||
await expect(edf).toBeVisible();
|
||||
await expect(ados).toBeVisible();
|
||||
await expect(birth).toBeVisible();
|
||||
await toggle.click();
|
||||
await expect(toggle).toHaveAttribute('aria-pressed', 'false');
|
||||
await expect(edf).toBeHidden();
|
||||
await expect(ados).toBeHidden();
|
||||
await expect(birth).toBeHidden();
|
||||
await toggle.click();
|
||||
await preview.getByLabel('EDF').setInputFiles(process.env['TEA_EDF']!);
|
||||
await preview.getByLabel('ADOS-2 (PDF)').setInputFiles(process.env['TEA_ADOS2']!);
|
||||
await preview.getByLabel('Fecha de nacimiento').fill(process.env['TEA_BIRTH']!);
|
||||
@@ -306,9 +315,5 @@ test('cacu gobernanza: the shared sections only, none of the TEA ones', async ({
|
||||
const nav = page.getByRole('navigation', { name: 'Dominios' });
|
||||
await expect(nav.getByRole('link', { name: 'Cáncer de mama' })).toBeVisible();
|
||||
await expect(nav.getByRole('link', { name: 'Trastorno del espectro autista' })).toBeVisible();
|
||||
expect(
|
||||
problems.filter(
|
||||
(p) => !p.endsWith('/models/cacu/all/inputs') && !p.startsWith('console: Failed to load'),
|
||||
),
|
||||
).toEqual([]);
|
||||
expect(problems.filter((p) => !p.startsWith('console: Failed to load'))).toEqual([]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user