diff --git a/e2e/pages.spec.ts b/e2e/pages.spec.ts
index 5bbe1c2..659ded8 100644
--- a/e2e/pages.spec.ts
+++ b/e2e/pages.spec.ts
@@ -109,14 +109,25 @@ test('tea gobernanza: every section in sync mode, and the preview saved as PDF',
}) => {
const problems = watch(page);
await page.goto('/gobernanza/tea');
- await page.getByLabel('Modo').selectOption('sync');
+ await expect(page.locator('app-gobernanza').getByRole('heading', { level: 2 })).toHaveText([
+ 'Ejecución',
+ 'Modelos',
+ 'Entrenamiento',
+ 'Bundles',
+ 'Estudios EEG',
+ 'Vista previa',
+ ]);
+ await page.getByRole('combobox', { name: 'Modo' }).click();
+ await page.getByRole('option', { name: 'Sync' }).click();
await expect(page.getByRole('status').filter({ hasText: 'Disponible' })).toBeVisible();
await page.getByRole('button', { name: 'Entrenar modelos' }).click();
- await expect(page.getByRole('heading', { name: 'Entrenar modelos', level: 3 })).toBeVisible();
+ const training = page.getByRole('heading', { name: 'Entrenamiento', level: 2 });
+ await expect(training).toBeVisible();
+ await expect(training).toBeFocused();
await expect(page.locator('app-governance-training formly-form')).toBeVisible();
- const monitor = page.locator('app-gobernanza > section > section app-run-monitor');
+ const monitor = page.locator('app-governance-models app-run-monitor');
await page.getByRole('button', { name: 'Analizar EEG' }).click();
await expect(page.getByRole('heading', { name: 'Análisis de EEG' })).toBeVisible();
await expect(monitor.getByRole('status')).toHaveText('SUCCESS', { timeout: 10 * 60_000 });
@@ -152,7 +163,8 @@ test('tea gobernanza: every section in sync mode, and the preview saved as PDF',
await dialog.getByRole('button', { name: 'Cerrar' }).click();
const bundles = page.locator('app-governance-bundles');
- await bundles.getByLabel('Versiones').selectOption('all');
+ await bundles.getByRole('combobox', { name: 'Versiones' }).click();
+ await page.getByRole('option', { name: 'Todas' }).click();
await bundles.getByRole('button', { name: 'Exportar bundle' }).click();
await expect(bundles.getByRole('alert')).toContainText('nothing to export');
expect(problems.filter((p) => !p.includes('409'))).toEqual([]);
diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts
index a41e5ec..6dcd9f6 100644
--- a/src/app/app.routes.ts
+++ b/src/app/app.routes.ts
@@ -16,8 +16,8 @@ export const routes: Routes = [
{
path: 'indicadores/tea/pacientes/:id/riesgo',
canActivate: [domainAllowed],
- data: { domain: 'tea' },
- loadComponent: () => import('./paciente/tea-patient').then((m) => m.TeaRisk),
+ data: { domain: 'tea', risk: true },
+ loadComponent: () => import('./paciente/paciente').then((m) => m.Paciente),
},
{
path: 'indicadores/:domain/pacientes/:id',
diff --git a/src/app/gobernanza/bundles.ts b/src/app/gobernanza/bundles.ts
index f54ad27..749c67f 100644
--- a/src/app/gobernanza/bundles.ts
+++ b/src/app/gobernanza/bundles.ts
@@ -2,6 +2,9 @@ import { HttpErrorResponse } from '@angular/common/http';
import { Component, inject, input, model, output, signal } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
+import { MatFormFieldModule } from '@angular/material/form-field';
+import { MatInputModule } from '@angular/material/input';
+import { MatSelectModule } from '@angular/material/select';
import { Api } from '../api/api';
import { exportModels, type ExportModels$Params } from '../api/fn/models/export-models';
import { importModels } from '../api/fn/models/import-models';
@@ -45,19 +48,19 @@ export function download(blob: Blob, filename: string): void {
@Component({
selector: 'app-governance-bundles',
- imports: [FormsModule, MatButtonModule],
+ imports: [FormsModule, MatButtonModule, MatFormFieldModule, MatInputModule, MatSelectModule],
template: `
-
- Bundles
+
+ Bundles
@if (exportedHash()) {
@@ -66,9 +69,28 @@ export function download(blob: Blob, filename: string): void {
}
@@ -85,6 +107,7 @@ export class Bundles {
readonly started = output();
protected readonly selection = signal>('champion');
protected readonly exportedHash = signal('');
+ protected readonly zipFiles = signal(null);
protected readonly hash = signal('');
protected readonly message = signal('');
protected readonly exporting = signal(false);
@@ -125,6 +148,7 @@ export class Bundles {
}),
);
input.value = '';
+ this.zipFiles.set(null);
if (domain === this.domain()) this.started.emit(run_id);
} catch (error) {
this.message.set(errorText(error));
diff --git a/src/app/gobernanza/execution.spec.ts b/src/app/gobernanza/execution.spec.ts
index d762293..1777c88 100644
--- a/src/app/gobernanza/execution.spec.ts
+++ b/src/app/gobernanza/execution.spec.ts
@@ -29,9 +29,13 @@ describe('execution', () => {
expect(fixture.componentInstance.execution()).toEqual({ mode: 'local', scheduler: null });
expect(invoke).toHaveBeenCalledWith(executionHealth, { mode: 'local', scheduler: null });
- const mode: HTMLSelectElement = fixture.nativeElement.querySelector('select');
- mode.value = 'remote';
- mode.dispatchEvent(new Event('change'));
+ const trigger: HTMLElement = fixture.nativeElement.querySelector('.mat-mdc-select-trigger');
+ trigger.click();
+ fixture.detectChanges();
+ const remote = Array.from(document.querySelectorAll('mat-option')).find(
+ (option) => option.textContent?.trim() === 'Remoto',
+ );
+ remote!.click();
fixture.detectChanges();
await fixture.whenStable();
fixture.detectChanges();
diff --git a/src/app/gobernanza/execution.ts b/src/app/gobernanza/execution.ts
index 716fdd6..40bb2ab 100644
--- a/src/app/gobernanza/execution.ts
+++ b/src/app/gobernanza/execution.ts
@@ -1,5 +1,9 @@
import { DOCUMENT } from '@angular/common';
import { Component, computed, effect, inject, model, resource, signal } from '@angular/core';
+import { MatButtonModule } from '@angular/material/button';
+import { MatFormFieldModule } from '@angular/material/form-field';
+import { MatInputModule } from '@angular/material/input';
+import { MatSelectModule } from '@angular/material/select';
import { Api } from '../api/api';
import { executionHealth } from '../api/fn/execution/execution-health';
import { executionOptions } from '../api/fn/execution/execution-options';
@@ -8,28 +12,30 @@ import type { Health } from '../api/models/health';
@Component({
selector: 'app-execution',
+ imports: [MatButtonModule, MatFormFieldModule, MatInputModule, MatSelectModule],
template: `
-
- Ejecución
+
+ Ejecución
@if (options.hasValue()) {
-
+
+ Modo
+
+ Sync
+ Local
+ Remoto
+
+
@if (choice().mode === 'remote') {
-
+