3장 섯다: 공개패는 항상 맨 왼쪽, 고른 2장은 쇼다운 전까지 다른 사람 화면에 드러나지 않게

- 공개패를 내 패·다른 사람 자리·쇼다운 모든 화면에서 맨 왼쪽에 둠(openFirst)
- 고른 뒤에도 다른 사람 화면은 고르기 전과 같음(공개패 앞면 + 뒷면 2장). 예전엔 남긴 2장만 보여 공개패를 남겼는지/버렸는지 드러났음
- 테스트: 공개패 남김/버림 두 경우 다른 사람 화면이 같음, 쇼다운 공개패 왼쪽, E2E에서 오른쪽 패를 공개하면 왼쪽으로 이동

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-18 08:07:45 +09:00
parent 1bd69200fd
commit d40ba1e121
4 changed files with 67 additions and 20 deletions

View File

@@ -1904,11 +1904,19 @@ const PLANS: Record<string, Plan> = {
await host.getByRole('button', { name: /^3장 섯다/ }).first().click();
},
drive: async (pages) => {
for (const p of pages) {
for (const [i, p] of pages.entries()) {
const box = p.getByRole('group', { name: '공개패 고르기' });
await box.waitFor({ timeout: 10_000 });
await box.locator('button, [role="button"]').first().click();
// The host shows the right-hand card: it must move to the left (사용자 요청 2026-10-18).
const card = i === 0 ? box.locator('.mine [aria-label]').last() : box.locator('button, [role="button"]').first();
const name = await card.getAttribute('aria-label');
await card.click();
await p.getByRole('button', { name: /패 공개하기$/ }).click();
if (i === 0) {
await p.waitForTimeout(300);
const first = await p.locator('.sd-handarea .mine [aria-label]').first().getAttribute('aria-label');
if (first !== name) throw new Error(`공개패 ${name} is not leftmost (left: ${first})`);
}
}
// The others now see one face-up card of each player.
await pages[0]!.waitForFunction(() => document.querySelectorAll('.sd-seat .sd-cards img, .sd-seat .sd-cards svg').length > 0, null, { timeout: 5000 }).catch(() => {});