Compare commits
1 Commits
6f462b8cb1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c27cb0a11a |
@@ -801,7 +801,7 @@ async function mafiaRoleOf(p: Page): Promise<'mafia' | 'police' | 'doctor' | 'ci
|
||||
async function mafiaPick(p: Page, nick: string) {
|
||||
const tile = p.locator('button.mf-tile[data-target="ok"]', { has: p.locator('.nm', { hasText: new RegExp(`^${nick}( \\(나\\))?$`) }) });
|
||||
await tile.click();
|
||||
await p.locator('button.mf-tile[aria-pressed="true"]', { has: p.locator('.nm', { hasText: new RegExp(`^${nick}( \\(나\\))?$`) }) }).waitFor({ timeout: 5000 });
|
||||
await p.locator('button.mf-tile[aria-pressed="true"]', { has: p.locator('.nm', { hasText: new RegExp(`^${nick}( \\(나\\))?$`) }) }).waitFor({ timeout: 15_000 });
|
||||
}
|
||||
|
||||
/** 마피아: writes in the selected channel tab and waits until the line shows up. */
|
||||
@@ -809,7 +809,7 @@ async function mafiaSay(p: Page, channel: '전체' | '마피아' | '죽은 사
|
||||
await p.getByRole('tab', { name: new RegExp(`^${channel} 채팅`) }).click();
|
||||
await p.getByLabel(`${channel} 채팅 메시지`).fill(text);
|
||||
await p.getByLabel(`${channel} 채팅 메시지`).press('Enter');
|
||||
await p.locator('.mf-msgs .mf-msg', { hasText: text }).waitFor({ timeout: 5000 });
|
||||
await p.locator('.mf-msgs .mf-msg', { hasText: text }).waitFor({ timeout: 15_000 });
|
||||
}
|
||||
|
||||
async function mafiaBanner(p: Page, phase: string, timeout = 40_000) {
|
||||
@@ -1890,13 +1890,14 @@ const PLANS: Record<string, Plan> = {
|
||||
// Channel checks: mafia and dead messages never reach other screens; the room chat is closed during the game.
|
||||
players: 4,
|
||||
lobby: async (host) => {
|
||||
await host.getByRole('group', { name: '밤 시간' }).getByRole('button', { name: '15초' }).click();
|
||||
// Night cannot end early (only its clock advances it), so give the night's chat+3 picks ample room under load.
|
||||
await host.getByRole('group', { name: '밤 시간' }).getByRole('button', { name: '45초' }).click();
|
||||
await host.getByRole('button', { name: '▼ 자세한 설정' }).click();
|
||||
await host.getByRole('group', { name: '지목 투표 시간' }).getByRole('button', { name: '10초', exact: true }).click();
|
||||
await host.getByRole('group', { name: '최후의 반론 시간' }).getByRole('button', { name: '10초', exact: true }).click();
|
||||
await host.getByRole('group', { name: '찬반 투표 시간' }).getByRole('button', { name: '5초', exact: true }).click();
|
||||
await host.getByRole('button', { name: '설정 저장' }).click();
|
||||
await host.getByText(/밤 15초 · 투표 10초/).first().waitFor();
|
||||
await host.getByText(/밤 45초 · 투표 10초/).first().waitFor();
|
||||
},
|
||||
drive: async (pages) => {
|
||||
const [host, phone] = pages as [Page, Page, Page, Page];
|
||||
@@ -1914,7 +1915,7 @@ const PLANS: Record<string, Plan> = {
|
||||
|
||||
await mafiaBanner(host, '인사 시간');
|
||||
await mafiaSay(phone, '전체', '안녕하세요 반가워요');
|
||||
for (const p of pages) await p.locator('.mf-msgs .mf-msg', { hasText: '안녕하세요 반가워요' }).waitFor({ timeout: 5000 });
|
||||
for (const p of pages) await p.locator('.mf-msgs .mf-msg', { hasText: '안녕하세요 반가워요' }).waitFor({ timeout: 15_000 });
|
||||
for (const p of pages) await p.getByRole('button', { name: /^인사 끝내기/ }).click();
|
||||
|
||||
for (const p of pages) await mafiaBanner(p, '밤');
|
||||
@@ -1939,7 +1940,7 @@ const PLANS: Record<string, Plan> = {
|
||||
}
|
||||
await mafiaShots(pages, '2-night');
|
||||
|
||||
for (const p of pages) await mafiaBanner(p, '낮 토론', 30_000);
|
||||
for (const p of pages) await mafiaBanner(p, '낮 토론', 60_000);
|
||||
for (const p of pages) await p.locator('.mf-news', { hasText: '아침 발표' }).waitFor();
|
||||
await pages[C]!.locator('.mf-news', { hasText: '탈락했어요' }).waitFor();
|
||||
await pages[P]!.locator('.mf-results', { hasText: '마피아예요!' }).waitFor();
|
||||
@@ -1965,7 +1966,7 @@ const PLANS: Record<string, Plan> = {
|
||||
await pages[M]!.locator('.mf-news', { hasText: '지목 투표 결과' }).waitFor();
|
||||
if (await pages[P]!.getByLabel('전체 채팅 메시지').count()) throw new Error('others can talk during the last defense');
|
||||
await mafiaSay(pages[M]!, '전체', '저는 진짜 시민이에요');
|
||||
await pages[P]!.locator('.mf-msgs .mf-msg', { hasText: '저는 진짜 시민이에요' }).waitFor({ timeout: 5000 });
|
||||
await pages[P]!.locator('.mf-msgs .mf-msg', { hasText: '저는 진짜 시민이에요' }).waitFor({ timeout: 15_000 });
|
||||
await mafiaShots(pages, '4-defense');
|
||||
await mafiaBanner(pages[P]!, '찬반 투표', 20_000);
|
||||
await pages[P]!.getByRole('button', { name: '찬성 (탈락)' }).click();
|
||||
|
||||
Reference in New Issue
Block a user