[fix](trx-frontend-http): show the map and statistics the whole picture #56

Merged
sjg merged 3 commits from fix/lazy-view-replay into main 2026-08-07 10:22:52 +02:00
Showing only changes of commit 17300170cc - Show all commits
@@ -270,10 +270,13 @@ try {
// on the tab (module loaded at startup, before the history) to show the lot. // on the tab (module loaded at startup, before the history) to show the lot.
await replay.page.evaluate(() => window.navigateToTab("statistics")); await replay.page.evaluate(() => window.navigateToTab("statistics"));
await replay.page.waitForTimeout(1500); await replay.page.waitForTimeout(1500);
const counted = await replay.page.evaluate(() => ({ // The counters are written with toLocaleString(), so a four-figure count
decodes: Number(document.getElementById("stats-total-decodes")?.textContent ?? "0"), // arrives as "1,220" — whichever separator the runner's locale picks. Read
grids: Number(document.getElementById("stats-unique-grids")?.textContent ?? "0"), // the digits rather than the formatting.
})); const counted = await replay.page.evaluate(() => {
const count = (id) => Number((document.getElementById(id)?.textContent ?? "").replace(/\D/g, ""));
return { decodes: count("stats-total-decodes"), grids: count("stats-unique-grids") };
});
assert.equal(counted.decodes, HISTORY_AIS + HISTORY_APRS + HISTORY_FT8 + HISTORY_WSPR, assert.equal(counted.decodes, HISTORY_AIS + HISTORY_APRS + HISTORY_FT8 + HISTORY_WSPR,
`the statistics counted ${counted.decodes} decodes`); `the statistics counted ${counted.decodes} decodes`);
// Grid squares come from the FT8 and WSPR spots, which had no map replay of // Grid squares come from the FT8 and WSPR spots, which had no map replay of