feat(indicadores): CaMa follow-up tab drawn from the announced filters and columns
The tab asks GET /cama/seguimiento when it is first opened and draws the form, the table, the details and the pagination from what the answer announces, so a later change of source behind the endpoint needs no change here. It shows the demonstration notice when the answer is simulated, a clear pending state while the endpoint is not published (404 on the first page), and error, empty and retry states. Stale requests are cancelled. The sections, CaCu and initial-integration specs now expect the CaMa request when the tab opens.
This commit is contained in:
@@ -84,7 +84,7 @@ describe.each(['tea', 'cacu', 'cama'] as const)('P0 autoridad temporal compartid
|
||||
const ongoing = request(periods[0]);
|
||||
for (const section of ['seguimiento', 'datos', 'resumen', 'datos'] as const) {
|
||||
page.changeSection(section); fixture.detectChanges();
|
||||
for (const req of http.match(r => r.url === '/cacu/seguimiento')) req.flush({}, { status: 404, statusText: 'Pending' });
|
||||
for (const req of http.match(r => r.url.endsWith('/seguimiento'))) req.flush({}, { status: 404, statusText: 'Pending' });
|
||||
expect(page.initialPeriodState()).toBe('loading');
|
||||
expect(ongoing.cancelled).toBe(false);
|
||||
http.expectNone(() => true);
|
||||
@@ -104,7 +104,7 @@ describe.each(['tea', 'cacu', 'cama'] as const)('P0 autoridad temporal compartid
|
||||
editor().select([periods[2]]); fixture.detectChanges();
|
||||
for (let i = 0; i < 3; i++) for (const section of ['seguimiento', 'datos', 'resumen'] as const) {
|
||||
page.changeSection(section); fixture.detectChanges();
|
||||
for (const req of http.match(r => r.url === '/cacu/seguimiento')) req.flush({}, { status: 404, statusText: 'Pending' });
|
||||
for (const req of http.match(r => r.url.endsWith('/seguimiento'))) req.flush({}, { status: 404, statusText: 'Pending' });
|
||||
expect(page.filters).toBe(state); expect(page.filters!.applied).toBe(applied);
|
||||
expect(editor().selectedPeriods).toEqual([periods[2]]);
|
||||
expect(cards()).toContain(card); expect(card.selectedFigure).toBe('g');
|
||||
|
||||
Reference in New Issue
Block a user