Telefono in verticale: la Pausa prende tutto lo schermo, la versione e la spiegazione non finiscono più sopra i verbi

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018ks2K99uqCZjAxvy7Rdj1R
This commit is contained in:
2026-10-25 20:06:48 +01:00
co-authored by Claude Opus 5.5
parent 0a0bb7eea4
commit 70f328c56d
2 changed files with 20 additions and 0 deletions
+17
View File
@@ -416,6 +416,23 @@ try {
await small.click('#pause-button');
assert.ok(await small.evaluate(() => document.getElementById('to-title').getBoundingClientRect().bottom <= document.getElementById('stage').getBoundingClientRect().bottom), 'la pausa esce dalla scena');
await small.screenshot({ path: `${OUT}/08b-telefono-stretto-pausa.png` });
// Telefono in verticale: la Pausa prende tutto lo schermo, e versione e spiegazione non finiscono sopra i verbi.
{
const tall = await browser.newPage({ viewport: { width: 412, height: 915 }, deviceScaleFactor: 2, hasTouch: true, isMobile: true });
await tall.goto(`http://127.0.0.1:${PORT}/`);
await tall.waitForSelector('#splash', { state: 'hidden', timeout: 15000 });
await tall.click('#new-game');
await tall.click('#rione [data-rione="campomigliaio"]');
await tall.click('#skip-intro');
await settle(tall);
await tall.click('#pause-button');
const fit = await tall.evaluate(() => {
const p = document.getElementById('pause'), v = p.querySelector('.version').getBoundingClientRect();
return { inside: p.scrollHeight <= p.clientHeight + 1, top: document.elementFromPoint(v.x + v.width / 2, v.y + v.height / 2)?.closest('#pause') !== null };
});
assert.deepEqual(fit, { inside: true, top: true }, 'in verticale la pausa esce dallo schermo o finisce sotto i verbi');
await tall.close();
}
const landscape = await open({ width: 844, height: 390 });
await landscape.click('#new-game');
await landscape.click('#rione [data-rione="campomigliaio"]');