Tests navigateur : bilan en page, et fin-de-partie.mjs (1m)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pierre MARTIN
2026-11-23 16:55:03 +01:00
co-authored by Claude Opus 5.5
parent 2a8d14d02b
commit d74e70f02b
11 changed files with 672 additions and 77 deletions
+3 -3
View File
@@ -156,7 +156,7 @@ async function todo() {
if (!panel.hidden) {
return panel.dataset.kind;
}
if (!document.getElementById("summary-veil").hidden) {
if (!document.getElementById("summary").hidden) {
return "over";
}
const usable = (id) => {
@@ -204,7 +204,7 @@ for (;;) {
document.getElementById("summary")?.dataset.ready === "true", null, 300_000);
const primary = await page.textContent("#summary-primary");
const now = await page.evaluate(() => {
const detail = document.getElementById("summary-reading").textContent;
const detail = document.getElementById("summary-detail").textContent;
const m = /vous (\d+), l'ordinateur (\d+)/.exec(detail);
return m === null ? null : { player: Number(m[1]), computer: Number(m[2]) };
});
@@ -227,7 +227,7 @@ for (;;) {
await page.click("#summary-primary");
games++;
await until("partie suivante", () => !document.body.classList.contains("busy") &&
document.getElementById("summary-veil").hidden);
document.getElementById("summary").hidden);
continue;
}
if (what === "doubled" || what === "take") {