Use the regular window for breast follow-up
This commit is contained in:
@@ -55,20 +55,17 @@ describe('Secciones compartidas por dominio', () => {
|
||||
pestana('seguimiento').click(); harness.detectChanges();
|
||||
// CaCu and CaMa request their own follow-up when the tab opens; the lab WebApi has neither yet (404).
|
||||
if (domain !== 'tea') {
|
||||
// CaMa asks for the cohort's revision first and reads the plain list when the cohort is not published.
|
||||
if (domain === 'cama') { http.expectOne(r => r.url === '/cama/analisis/indicadores').flush({}, { status: 404, statusText: 'Pending' }); }
|
||||
http.expectOne(r => r.url === '/' + domain + '/seguimiento').flush({}, { status: 404, statusText: 'Pending' });
|
||||
harness.detectChanges();
|
||||
}
|
||||
const tracking = root.querySelector<HTMLElement>('#panel-seguimiento')!;
|
||||
expect(tracking.hidden).toBe(false);
|
||||
expect(tracking.textContent).toContain('El seguimiento aún no está disponible');
|
||||
expect(tracking.textContent).toContain(domain === 'cama' ? 'La cohorte no está disponible' : 'El seguimiento aún no está disponible');
|
||||
if (domain === 'cacu') {
|
||||
expect(tracking.querySelector('tbody')).toBeNull();
|
||||
expect(tracking.querySelector('input[type=date]')).not.toBeNull();
|
||||
} else if (domain === 'cama') {
|
||||
// Pending integration: the form is gone with no table, and the retry is offered.
|
||||
expect(tracking.textContent).toContain('Funcionalidad pendiente de publicación');
|
||||
// An unavailable cohort has no table and offers a retry.
|
||||
expect(tracking.querySelector('table')).toBeNull();
|
||||
expect(tracking.querySelector('app-seguimiento-tabla')).not.toBeNull();
|
||||
expect(Array.from(tracking.querySelectorAll('button')).map(b => b.textContent?.trim())).toContain('Reintentar seguimiento');
|
||||
|
||||
Reference in New Issue
Block a user