Mode paysage : plateau ajusté à la hauteur de l'écran, boutons à droite

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pierre MARTIN
2026-11-03 01:22:54 +01:00
co-authored by Claude Opus 5.5
parent f8b89a8c44
commit 359cdcbb38
3 changed files with 50 additions and 1 deletions
+14
View File
@@ -248,6 +248,20 @@ await waitForPlayer();
await shot("6-sombre");
await page.emulateMedia({ colorScheme: "light" });
step("paysage");
// Téléphone tourné : le plateau et les boutons tiennent dans l'écran.
for (const [width, height] of [[915, 412], [740, 360]]) {
await page.setViewportSize({ width, height });
const board = await page.locator("#board").boundingBox();
const actions = await page.locator(".actions").boundingBox();
check(board.y + board.height <= height && board.x + board.width <= width,
`paysage ${width}x${height} : plateau hors de l'écran`);
check(actions.y + actions.height <= height, `paysage ${width}x${height} : boutons hors de l'écran`);
}
log("paysage : plateau et boutons visibles en entier");
await shot("6-paysage");
await page.setViewportSize({ width: 360, height: 740 });
step("mise en cache");
// Hors ligne : une fois le cache du service worker rempli, la page se
// recharge sans réseau, et le moteur répond.