PC 창을 줄였을 때(720~1099px)도 채팅: 옆 채팅 칸이 없는 폭이면 방 막대에 💬 채팅 버튼(전에는 휴대폰 폭에서만 보여 이 구간엔 채팅이 아예 없었음). 넓은 폭에선 버튼과 시트를 숨김. chat.e2e.ts에 900/760px 확인 추가
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* E2E: the room chat stays at the newest line (also after more than 100 lines, when the list is full), lets the reader
|
||||
* scroll up without jumping, shows who said what as a name line + bubble, and has no "가리기" button any more.
|
||||
* PC lobby + PC in-game side panel + phone chat sheet (unread badge past 100 lines too).
|
||||
* PC lobby + PC in-game side panel + phone chat sheet (unread badge past 100 lines too) + narrowed PC window (720–1099px) chat button.
|
||||
* Run: E2E_PORT=4641 bun e2e/chat.e2e.ts (needs apps/web/dist built)
|
||||
*/
|
||||
import { chromium, type Page } from 'playwright-core';
|
||||
@@ -222,6 +222,25 @@ try {
|
||||
await sheet.getByRole('button', { name: '닫기' }).click();
|
||||
});
|
||||
|
||||
await step('PC 창을 줄여도(720~1099px) 채팅 버튼으로 채팅을 볼 수 있음', async () => {
|
||||
for (const width of [900, 760]) {
|
||||
await a.setViewportSize({ width, height: 900 });
|
||||
await a.waitForTimeout(150);
|
||||
if (await a.locator('.chat-panel').count()) throw new Error(`${width}px: unexpected inline chat panel`);
|
||||
await a.locator('.room-bar').getByRole('button', { name: /^채팅/ }).click();
|
||||
const sheet = a.getByRole('dialog', { name: '채팅' });
|
||||
await sheet.locator('.chat-line', { hasText: '치는 중 계속' }).waitFor();
|
||||
await say(a, `줄인 창 ${width}`);
|
||||
await sheet.locator('.chat-line', { hasText: `줄인 창 ${width}` }).waitFor();
|
||||
if (width === 900) await a.screenshot({ path: join(SHOTS, 'chat-sheet-pc-narrow.png') });
|
||||
await sheet.getByRole('button', { name: '닫기' }).click();
|
||||
}
|
||||
// Wide again: the side panel is back and the bar button goes away.
|
||||
await a.setViewportSize({ width: 1440, height: 900 });
|
||||
await a.locator('.chat-panel').first().waitFor();
|
||||
if (await a.locator('.room-bar').getByRole('button', { name: /^채팅/ }).count()) throw new Error('chat button still on the wide bar');
|
||||
});
|
||||
|
||||
await step('소리 크기: 방 막대 오른쪽 위, 기본 50, 0~100', async () => {
|
||||
const btn = a.locator('.room-bar').getByRole('button', { name: /^소리 크기/ });
|
||||
if ((await btn.getAttribute('aria-label')) !== '소리 크기 50') throw new Error(`default: ${await btn.getAttribute('aria-label')}`);
|
||||
|
||||
Reference in New Issue
Block a user