feat(ui): habilitar apertura automatica UX-06E.D.1.1
This commit is contained in:
@@ -57,8 +57,8 @@ describe('UX-05C búsqueda local y partición estable', () => {
|
||||
it.each([0, 1, 4, 5, 18, 37])('muestra búsqueda exclusivamente desde cinco: catálogo de %i', count => {
|
||||
load(Array.from({ length: count }, (_, i) => ({ ...items[0], id: 'id-' + i })));
|
||||
expect(!!input()).toBe(count >= 5); expect(cards()).toHaveLength(count);
|
||||
expect(cards().every(c => c.expanded === (count === 1))).toBe(true);
|
||||
if (count === 1) respond(); else http.expectNone(() => true);
|
||||
expect(cards().every(c => !c.expanded)).toBe(true);
|
||||
http.expectNone(() => true);
|
||||
if (!count) expect(fixture.nativeElement.textContent).toContain('No hay indicadores disponibles');
|
||||
});
|
||||
it.each([
|
||||
@@ -210,9 +210,10 @@ describe('UX-05C búsqueda local y partición estable', () => {
|
||||
load(); cards()[2].toggle(); fixture.detectChanges(); respond(); await settle();
|
||||
filters()[0].changeMode('manual'); filters()[0].year = '2025'; filters()[0].unit = 'S1'; filters()[0].add();
|
||||
await search('sexo'); page.changeDominio('cacu'); fixture.detectChanges(); expect(page.searchQuery()).toBe('');
|
||||
load([{ ...items[0], figuras: [] }], 'cacu'); expect(input()).toBeNull(); expect(cards()[0].expanded).toBe(true);
|
||||
load([{ ...items[0], figuras: [] }], 'cacu'); expect(input()).toBeNull(); expect(cards()[0].expanded).toBe(false);
|
||||
page.changeDominio('tea'); fixture.detectChanges(); load(); expect(page.searchQuery()).toBe('');
|
||||
expect(cards().map(c => c.expanded)).toEqual([false, false, true, false, false]);
|
||||
http.expectNone(() => true); cards()[2].toggle(); fixture.detectChanges();
|
||||
const r = request('M02_sexo'); expect(r.request.params.has('periodos')).toBe(false); r.flush({ data: [], layout: {} });
|
||||
expect(filters()[0].selectedPeriods).toEqual(['2025-S1']);
|
||||
await search('sexo'); fixture.destroy(); fixture = TestBed.createComponent(IndicadoresPage); page = fixture.componentInstance; load(); respond();
|
||||
|
||||
Reference in New Issue
Block a user