채팅을 따로 분리해 속도 제한 없이: 방 채팅·마피아·라이어·그림 맞히기(그리기 전) 채팅의 줄 간격 제한(chat-pace)과 브라우저 대기열을 없애 치는 대로 바로 보냄. 서버 연결당 공용 한도(초당 20개)를 채팅·입력 중 신호가 같이 써서 빠르게 치면 15번째 줄부터 조용히 사라지던 문제도: 채팅은 별도 한도(초당 50, 최대 200, 매크로 도배 방지용)로 분리. 게임 채팅은 보내는 동안 게임 버튼을 잠그지 않음(pending 미설정)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -163,23 +163,25 @@ try {
|
||||
await b.getByRole('button', { name: '채팅', exact: true }).waitFor();
|
||||
});
|
||||
|
||||
await step('빠르게 여러 번 Enter: 전부 순서대로, 바로 들어감', async () => {
|
||||
await step('빠르게 여러 번 Enter: 제한 없이 전부 순서대로, 바로 들어감', async () => {
|
||||
await a.waitForTimeout(1500);
|
||||
const input = a.locator('.chat-panel input[aria-label="메시지"]').first();
|
||||
const N = 20;
|
||||
const t0 = performance.now();
|
||||
for (let i = 1; i <= 7; i++) {
|
||||
for (let i = 1; i <= N; i++) {
|
||||
await input.fill(`연타 ${i}`);
|
||||
await input.press('Enter');
|
||||
}
|
||||
for (let i = 1; i <= 7; i++) await a.locator('.chat-line', { hasText: `연타 ${i}` }).waitFor({ timeout: 10_000 });
|
||||
// Lines used to go out one per 0.55 s (7 lines ≈ 3.3 s); now a quick run goes at once.
|
||||
await a.locator('.chat-line .chat-text', { hasText: new RegExp(`^연타 ${N}$`) }).waitFor({ timeout: 10_000 });
|
||||
// No pace limit any more: 20 lines in a row (well past the old 6-line burst) all show right away.
|
||||
const ms = performance.now() - t0;
|
||||
if (ms > 1500) throw new Error(`7 quick lines took ${Math.round(ms)}ms to show`);
|
||||
console.log(` 7 quick lines shown in ${Math.round(ms)}ms`);
|
||||
const got = await a.locator('.chat-line .chat-text', { hasText: /^연타 \d$/ }).allInnerTexts();
|
||||
if (got.join(',') !== [1, 2, 3, 4, 5, 6, 7].map((i) => `연타 ${i}`).join(',')) throw new Error(`order/lost: ${got.join(',')}`);
|
||||
// The other side got them all too (phone sheet closed: the badge counts 7).
|
||||
await b.getByRole('button', { name: '채팅, 새 메시지 7개' }).waitFor({ timeout: 5000 });
|
||||
if (ms > 2000) throw new Error(`${N} quick lines took ${Math.round(ms)}ms to show`);
|
||||
console.log(` ${N} quick lines shown in ${Math.round(ms)}ms`);
|
||||
const got = await a.locator('.chat-line .chat-text', { hasText: /^연타 \d+$/ }).allInnerTexts();
|
||||
const want = Array.from({ length: N }, (_, i) => `연타 ${i + 1}`);
|
||||
if (got.join(',') !== want.join(',')) throw new Error(`order/lost: ${got.join(',')}`);
|
||||
// The other side got them all too (phone sheet closed: the badge counts them).
|
||||
await b.getByRole('button', { name: `채팅, 새 메시지 ${N}개` }).waitFor({ timeout: 5000 });
|
||||
});
|
||||
|
||||
await step('사람도 "입력 중" 표시: 치는 동안 보이고, 보내면 사라짐', async () => {
|
||||
|
||||
@@ -2805,6 +2805,21 @@ 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: 15_000 });
|
||||
// No chat pace limit: 15 lines typed back to back all show up right away, in order, on every screen.
|
||||
{
|
||||
const box = phone.getByLabel('전체 채팅 메시지');
|
||||
const t0 = performance.now();
|
||||
for (let i = 1; i <= 15; i++) {
|
||||
await box.fill(`연타 ${i}`);
|
||||
await box.press('Enter');
|
||||
}
|
||||
for (const p of pages) await p.locator('.mf-msgs .mf-msg', { hasText: /연타 15$/ }).waitFor({ timeout: 15_000 });
|
||||
const ms = performance.now() - t0;
|
||||
if (ms > 3000) throw new Error(`15 quick mafia chat lines took ${Math.round(ms)}ms`);
|
||||
const got = (await host.locator('.mf-msgs .mf-msg', { hasText: /연타 \d+$/ }).allInnerTexts()).map((t) => t.match(/연타 \d+$/)![0]);
|
||||
if (got.join(',') !== Array.from({ length: 15 }, (_, i) => `연타 ${i + 1}`).join(',')) throw new Error(`mafia chat order/lost: ${got.join(',')}`);
|
||||
console.log(` mafia: 15 quick chat lines on every screen in ${Math.round(ms)}ms`);
|
||||
}
|
||||
for (const p of pages) await p.getByRole('button', { name: /^인사 끝내기/ }).click();
|
||||
|
||||
for (const p of pages) await mafiaBanner(p, '밤');
|
||||
|
||||
Reference in New Issue
Block a user