CaMa: present diagnostic pathway and biopsy results
This commit is contained in:
+23
-1
@@ -210,7 +210,29 @@ for (const domain of ['cama', 'tea']) {
|
||||
test(`indicadores ${domain}: the old page's headings, in order, and the same kinds of plots`, async ({
|
||||
page,
|
||||
}) => {
|
||||
const old = captured(domain);
|
||||
const all = captured(domain);
|
||||
// CaMa's five timeliness boxes are one route card now: its heading stands for them.
|
||||
const route = all.findIndex(
|
||||
(i) => i.kind === 'h3' && i.text === 'Tiempo de tamizaje a diagnóstico',
|
||||
);
|
||||
const clinical = all.findIndex((i) => i.text === 'Indicadores clínicos');
|
||||
// Lote 2: the detection rate has its own title, and the histopathology figures are two
|
||||
// cards (the result by BI-RADS; the confirmation in two readings).
|
||||
const detection = (i: { text?: string }) =>
|
||||
i.text === 'Tasa de confirmación histopatológica'
|
||||
? { ...i, text: 'Tasa de detección histopatológica' }
|
||||
: i;
|
||||
const results = all.findIndex(
|
||||
(i) => i.text === 'Resultado histopatológico por categoría BI-RADS',
|
||||
);
|
||||
const cards = [
|
||||
{ kind: 'h3', text: 'Resultado histopatológico por categoría BI-RADS' },
|
||||
{ kind: 'h3', text: 'Confirmación histopatológica' }, // one card: title, tabs and reading
|
||||
];
|
||||
const old =
|
||||
domain === 'cama'
|
||||
? [...all.slice(0, route + 1).map(detection), ...all.slice(clinical, results), ...cards]
|
||||
: all;
|
||||
await page.goto(`/indicadores/${domain}`);
|
||||
const tab = page.locator('app-tab-indicadores');
|
||||
await expect(tab.getByRole('heading', { name: 'Indicadores clínicos' })).toBeVisible();
|
||||
|
||||
Reference in New Issue
Block a user