증강 윷놀이: 이의있음! 재선택에서는 혼돈 모드 두 번째 후보에도 이의있음!이 안 나오게, 증강 팝업이 위아래 공간이 모자라도 화면 안에 들어오게

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-11-08 02:32:05 +09:00
parent 7084a20e59
commit c2ce1979b2
4 changed files with 50 additions and 4 deletions

View File

@@ -1776,7 +1776,23 @@ const PLANS: Record<string, Plan> = {
else await p.locator('.aug-bar').first().tap();
await pop(p).waitFor({ state: 'detached', timeout: 3000 });
}
console.log(' yut-aug: chip popups ok (hover on PC, tap on phone)');
// a short landscape window (844×390): every chip's card stays fully on screen, whichever side it opens on
const vp0 = host.viewportSize()!;
await host.setViewportSize({ width: 844, height: 390 });
const chips = host.locator('.aug-chip');
for (let i = 0; i < (await chips.count()); i++) {
for (const block of ['start', 'center', 'end'] as const) {
await chips.nth(i).evaluate((el, b) => el.scrollIntoView({ block: b }), block);
await host.mouse.move(2, 2);
await chips.nth(i).hover();
await pop(host).waitFor({ timeout: 3000 });
const box = (await pop(host).boundingBox())!;
if (box.y < 0 || box.y + box.height > 390 || box.x < 0 || box.x + box.width > 844) throw new Error(`augment popup off a 844×390 screen ${JSON.stringify(box)}`);
}
}
await host.mouse.move(2, 2);
await host.setViewportSize(vp0);
console.log(' yut-aug: chip popups ok (hover on PC, tap on phone, 844×390)');
}
if (steps === 30 || steps === 120 || steps === 200) {
await host.screenshot({ path: join(SHOTS, `yut-aug-mid${steps}-pc.png`) });