CaMa Indicadores as the old page: its cards, timeliness boxes with pending ones, BI-RADS 4–6 donuts, malignancy by BI-RADS and the biopsy donut, the confirmation card; page definitions apart from figure builders

This commit is contained in:
Roberto Treviño
2026-11-28 10:09:30 -06:00
parent 9a15ac6fcb
commit 3e096dd03f
6 changed files with 692 additions and 308 deletions
+5 -2
View File
@@ -186,12 +186,15 @@ function captured(domain: string) {
const path = `../tests/fixtures/reference/${domain}/ui/pages.json`;
const items = JSON.parse(readFileSync(path, 'utf8')).tabs['Indicadores'] as any[];
const from = items.findIndex((i) => i.text === 'Indicadores de oportunidad');
return items.slice(from).filter((i) => ['h2', 'h3', 'plot'].includes(i.kind));
return items
.slice(from)
.filter((i) => ['h2', 'h3', 'plot'].includes(i.kind))
.filter((i) => !/^(cacu|cama|tea), /.test(i.text ?? '')); // a figure's machine caption
}
const period = (text: string) => text.replace(/, \d{4}-(S[12]|\d{2})$/, ', <periodo>');
const kindOf = (types: string[]) => [...new Set(types)].sort().join('+');
for (const domain of ['cacu']) {
for (const domain of ['cacu', 'cama']) {
test(`indicadores ${domain}: the old page's headings, in order, and the same kinds of plots`, async ({
page,
}) => {