Recette des retours : capture après le bandeau, capture si le bouton reste caché

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pierre MARTIN
2026-11-12 02:54:27 +01:00
co-authored by Claude Opus 5.5
parent 8c2043aca5
commit 5a13c40bbb
+6 -1
View File
@@ -107,7 +107,10 @@ async function startFrom(page, position) {
const play = document.getElementById("position-play");
return !play.hidden && !play.disabled;
});
await page.click("#position-play");
await page.click("#position-play", { timeout: 15_000 }).catch(async (error) => {
await page.screenshot({ path: `${dir}/${browserName}-bloque.png` }).catch(() => {});
throw error;
});
await until(
page,
"partie commencée",
@@ -149,6 +152,8 @@ async function numberProblems(page, selector) {
/** Les règles sur l'écran courant, dans chaque taille, et sa capture
* (Chromium). */
async function checkScreen(page, theme, name, selector, settle = async () => {}) {
// Le bandeau « Reprendre l'ancienne » (10 s) n'est pas le sujet.
await until(page, "bandeau parti", () => document.getElementById("banner").hidden, null, 15_000);
for (const size of SIZES) {
await page.setViewportSize(size);
await sleep(300);