feat(cama): add synthetic histopathology breakdown for demo

This commit is contained in:
Angel Capetillo Zavala
2026-11-19 19:06:32 -06:00
parent f6603ae76e
commit 56b3ac6b0c
19 changed files with 393 additions and 312 deletions
@@ -15,6 +15,7 @@ import { IndicadoresPage } from './indicadores-page';
import { IndicadorFigureCard } from './indicador-figure-card';
import { IndicadorPeriodFilters } from './indicador-period-filters';
import { PlotlyChart } from '../../shared/plotly/plotly-chart';
import { ID_HISTOPATOLOGIA_CAMA } from './indicadores-kpi';
import { PlotlyFigure } from './indicadores.models';
import { syntheticCatalogs } from './indicadores.synthetic-fixtures';
@@ -36,7 +37,9 @@ describe('UX-04 navegación Angular', () => {
harness.detectChanges();
const page = harness.routeDebugElement!.componentInstance as IndicadoresPage;
vi.spyOn(page as unknown as { evaluateVisibility(): void }, 'evaluateVisibility').mockImplementation(() => {});
const card = harness.routeDebugElement!.query(By.directive(IndicadorCatalogCard)).componentInstance as IndicadorCatalogCard;
// CaMa leads with the histopathology card, which reads a local source; the figure request comes from the next one.
const card = harness.routeDebugElement!.queryAll(By.directive(IndicadorCatalogCard)).map(e => e.componentInstance as IndicadorCatalogCard)
.find(item => item.indicador.id !== ID_HISTOPATOLOGIA_CAMA)!;
if (!card.visible) { card.setVisible(true); harness.detectChanges(); }
const req = http.expectOne(r => r.url.includes('/figuras/'));
req.flush({ data: [{ y: [0, null] }], layout: {} });