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:
2026-12-01 13:49:28 -06:00
parent e14a85261c
commit 71777537e1
22 changed files with 349 additions and 649 deletions
+30 -1
View File
@@ -1,4 +1,6 @@
import { checkActions } from './models';
import { TestBed } from '@angular/core/testing';
import { Api } from '../api/api';
import { checkActions, Models } from './models';
describe('version checks', () => {
it('enables promotion only when the API says the version is promotable', () => {
@@ -14,3 +16,30 @@ describe('version checks', () => {
expect(checkActions({ status: 'candidate', promotable: true, checks: [] }).retire).toBe(true);
});
});
describe('single study evaluation', () => {
it('toggles the preview form below the Modelos button row', async () => {
TestBed.overrideProvider(Api, { useValue: { invoke: vi.fn().mockResolvedValue([]) } });
const fixture = TestBed.createComponent(Models);
fixture.componentRef.setInput('domain', 'tea');
fixture.detectChanges();
await fixture.whenStable();
const host: HTMLElement = fixture.nativeElement;
const toggle = host.querySelector<HTMLButtonElement>('button[aria-pressed]')!;
const form = host.querySelector<HTMLFormElement>('.button-row + app-eeg-preview > form')!;
expect(toggle.getAttribute('aria-pressed')).toBe('false');
expect(form.hidden).toBe(true);
toggle.click();
fixture.detectChanges();
expect(toggle.getAttribute('aria-pressed')).toBe('true');
expect(form.hidden).toBe(false);
expect(form.querySelectorAll('input')).toHaveLength(3);
toggle.click();
fixture.detectChanges();
expect(toggle.getAttribute('aria-pressed')).toBe('false');
expect(form.hidden).toBe(true);
});
});