Le bocce al pallaio contro Mariano: si tiene premuto per la forza, tre bocce a testa, vince il più vicino al pallino; se vinci, «Hai vinto, ti ci porto!» a Brento Sanico (sfondo e Mariano di Codex dalle foto di Andrea)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ks2K99uqCZjAxvy7Rdj1R
This commit is contained in:
@@ -362,6 +362,34 @@ try {
|
||||
await book.close();
|
||||
}
|
||||
|
||||
// Le bocce al pallaio: col mouse tenuto premuto la forza sale, lasciando la boccia parte; la scena dietro è ferma.
|
||||
{
|
||||
const bocce = await open({ width: 1280, height: 860 });
|
||||
await bocce.click('#splash');
|
||||
await bocce.click('#new-game');
|
||||
await bocce.click('#rione [data-rione="campomigliaio"]');
|
||||
await bocce.click('#skip-intro');
|
||||
await settle(bocce);
|
||||
await bocce.evaluate(() => game.go('tennis_chiesa', [430, 310]));
|
||||
await settle(bocce);
|
||||
await clickScene(bocce, await hotspotCenter(bocce, 'mariano'));
|
||||
await bocce.waitForFunction(() => game.dialogue && !game.busy, null, { timeout: 20000 });
|
||||
await bocce.locator('#choices li', { hasText: 'Facciamo una partita' }).click();
|
||||
await bocce.waitForFunction(() => game.closeup?.id === 'bocce' && game.closeup.step === 'aim' && !game.speech, null, { timeout: 30000 });
|
||||
const r = await bocce.locator('#scene').boundingBox();
|
||||
await bocce.mouse.move(r.x + r.width / 2, r.y + r.height / 2);
|
||||
await bocce.mouse.down();
|
||||
await bocce.waitForTimeout(500);
|
||||
assert.ok(await bocce.evaluate(() => game.closeup.power > 0.2), 'tenendo premuto la forza sale');
|
||||
await bocce.screenshot({ path: `${OUT}/03c-bocce-forza.png` });
|
||||
await bocce.mouse.up();
|
||||
assert.equal(await bocce.evaluate(() => game.closeup.balls.length), 1, 'lasciando, la boccia parte');
|
||||
await bocce.waitForFunction(() => game.closeup.balls.length === 2, null, { timeout: 15000 });
|
||||
await bocce.keyboard.press('Escape');
|
||||
await bocce.waitForFunction(() => game.speech?.text.startsWith('Già stanco?'), null, { timeout: 5000 });
|
||||
await bocce.close();
|
||||
}
|
||||
|
||||
const phone = await open({ width: 390, height: 844 });
|
||||
await phone.click('#splash'); // un clic salta il cartello
|
||||
assert.ok(await phone.isVisible('#title'), 'il clic sul cartello porta al titolo');
|
||||
|
||||
Reference in New Issue
Block a user