Abandon accepté : test du bilan sans coup, résultat sans détail vide

Test du domaine : un abandon accepté avant tout coup finit la partie et se
résume (aucune analyse attendue, un tour sans coup). Le test navigateur
n'interroge plus l'écran entre le panneau de fin et le bilan, où ni l'un
ni l'autre n'est affiché un court instant ; il vérifie le bilan, puis la
partie finie à l'écran. La ligne de résultat n'a plus de deux-points
suivis de rien.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pierre MARTIN
2026-11-23 07:09:59 +01:00
co-authored by Claude Opus 5.5
parent c33bef1321
commit b5e3d81e69
3 changed files with 36 additions and 13 deletions
+6 -12
View File
@@ -236,25 +236,19 @@ await until("fin de partie", (title) =>
(!document.getElementById("summary-veil").hidden &&
document.getElementById("summary-title")?.textContent === title),
"Perdue par abandon, gammon, 4 points");
const ended = await page.evaluate(() => ({
panel: document.getElementById("panel-veil").hidden ? null : document.getElementById("panel-text").textContent,
summary: document.getElementById("summary-veil").hidden
? null
: document.getElementById("summary-title")?.textContent,
info: document.getElementById("info").textContent,
flag: !document.getElementById("resign").hidden,
}));
check((ended.panel ?? ended.summary) === "Perdue par abandon, gammon, 4 points",
`fin par abandon : ${JSON.stringify(ended)}`);
check(!ended.flag, "drapeau après la fin");
await capture("4-abandon-accepte");
check(await page.isHidden("#resign"), "drapeau après la fin");
// Le bilan, une fois l'analyse prête, dit aussi l'abandon.
await until("bilan prêt", () => !document.getElementById("summary-veil").hidden &&
document.getElementById("summary")?.dataset.ready === "true", null, 120_000);
const summaryTitle = await page.textContent("#summary-title");
check(summaryTitle === "Perdue par abandon, gammon, 4 points", `bilan : « ${summaryTitle} »`);
await capture("5-bilan-abandon");
// Le bilan fermé laisse la partie finie à l'écran, avec son résultat.
await page.click("#summary-close");
await until("partie finie à l'écran", () => location.hash === "#/" &&
document.getElementById("summary-veil").hidden &&
document.getElementById("prompt").textContent.startsWith("Perdue par abandon, gammon, 4 points"));
await capture("4-abandon-accepte");
// ------------------------- Partie libre, videau au centre : Jacoby