Gobernanza: Analizar EEG leads to Estudios EEG, which hosts the single-study evaluation; the timeline is only a dotted line; the probability curve and the age-norm bands are drawn from the model and the centiles

This commit is contained in:
2026-12-01 18:25:08 -06:00
parent f7eb170e15
commit 98eda5bc28
14 changed files with 187 additions and 141 deletions
+1 -30
View File
@@ -1,6 +1,4 @@
import { TestBed } from '@angular/core/testing';
import { Api } from '../api/api';
import { checkActions, Models } from './models';
import { checkActions } from './models';
describe('version checks', () => {
it('enables promotion only when the API says the version is promotable', () => {
@@ -16,30 +14,3 @@ 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);
});
});