The old CaCu and CaMa pages as rendered: headings, cards, plots, their data, loading indicators and screenshots
ci / python (push) Failing after 5m52s
ci / web (push) Failing after 9m56s

This commit is contained in:
Roberto Treviño
2026-11-28 09:48:49 -06:00
parent 5eda1dffe2
commit 3527b395de
17 changed files with 85009 additions and 13 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

+17
View File
@@ -0,0 +1,17 @@
{
"domain": "cacu",
"web": {
"tag": "isssteleon-cacu197/webapp:local",
"id": "sha256:60954f03649bfa263549cb0f336ee9f7d723c9117ed3aa4d5ef1c9a8c62f6663"
},
"api": {
"tag": "isssteleon-cacu197/webapi:local",
"id": "sha256:446a58a21ef841eff1acbfa6386a48f5482342e9c75cc76465491cecd6462642"
},
"load": [
"cacu.Paciente: 312 le\u00eddas, 312 nuevas, 0 actualizadas, 0 rechazadas",
"cacu.CitologiaCervical: 461 le\u00eddas, 461 nuevas, 0 actualizadas, 0 rechazadas",
"cacu.BiopsiaCervical: 47 le\u00eddas, 47 nuevas, 0 actualizadas, 0 rechazadas",
"cacu.NotaMedica: 349 le\u00eddas, 349 nuevas, 0 actualizadas, 0 rechazadas"
]
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

+17
View File
@@ -0,0 +1,17 @@
{
"domain": "cama",
"web": {
"tag": "isssteleon/webapp:cama-dev-3743ea6",
"id": "sha256:604206dad07d8346035bdc3a61a797dc1eb4e0bdd9f2e6cd73c7d19e863d8871"
},
"api": {
"tag": "isssteleon/webapi:cama-dev-3743ea6",
"id": "sha256:8fed1871259111828712104fda899ce8bffb5a6eaa9813195d99dd15315ac7ff"
},
"load": [
"cama.Paciente: 300 le\u00eddas, 300 nuevas, 0 actualizadas, 0 rechazadas",
"cama.Mastografia: 400 le\u00eddas, 400 nuevas, 0 actualizadas, 0 rechazadas",
"cama.BiopsiaMama: 108 le\u00eddas, 108 nuevas, 0 actualizadas, 0 rechazadas",
"cama.NotaMedica: 218 le\u00eddas, 218 nuevas, 0 actualizadas, 0 rechazadas"
]
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

+18 -13
View File
@@ -136,26 +136,31 @@ await page.waitForTimeout(400);
await page.screenshot({ path: `${OUT}/loading.png` });
await page.waitForLoadState("networkidle", { timeout: 600_000 });
await page.waitForTimeout(3000);
const names = await page.$$eval("[role=tab]", (els) =>
// The page's sections (its figures have tabs of their own).
const names = await page.$$eval(".section-tabs [role=tab]", (els) =>
els.filter((e) => e.checkVisibility?.()).map((e) => e.innerText.trim()),
);
/** The old app gives up on a slow figure and offers to retry: retry until none is left. */
/** Settled: no loading indicator in sight and nothing to retry (the old app gives up on a
* slow figure and offers "Reintentar"); at most 15 minutes. */
async function settle() {
for (let round = 0; round < 4; round++) {
await page.waitForLoadState("networkidle", { timeout: 600_000 });
await page.waitForTimeout(3000);
const deadline = Date.now() + 15 * 60_000;
while (Date.now() < deadline) {
await page.waitForTimeout(2000);
const loading = await page.$$eval(LOADING, (els) => els.filter((e) => e.checkVisibility?.()).length);
const retries = page.getByRole("button", { name: /^Reintentar/ });
const n = await retries.count();
if (!n) return;
for (let k = 0; k < n; k++)
await retries
.nth(0)
.click()
.catch(() => {});
if (await retries.count()) {
await retries.first().click().catch(() => {});
continue;
}
if (!loading) {
await page.waitForTimeout(2000); // the plots draw after their data
return;
}
}
console.error("still loading after 15 minutes");
}
for (const [i, name] of names.entries()) {
await page.getByRole("tab", { name, exact: true }).first().click();
await page.locator(".section-tabs [role=tab]", { hasText: name }).first().click();
await settle();
tabs[name] = await page.evaluate(structure);
await page.screenshot({ path: `${OUT}/tab-${i + 1}.png`, fullPage: true });