휴대폰 채팅 시트: 새 메시지가 올 때마다 입력 칸 포커스가 빠져 키보드가 닫히던 문제(Sheet가 onClose가 바뀔 때마다 포커스를 다시 잡음) — 열 때 한 번만 포커스를 옮기게
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -201,6 +201,25 @@ try {
|
||||
await sheet.getByRole('button', { name: '닫기' }).click();
|
||||
});
|
||||
|
||||
await step('휴대폰 채팅 시트: 새 메시지가 와도 입력 칸 포커스(키보드)가 그대로', async () => {
|
||||
await b.getByRole('button', { name: /^채팅/ }).click();
|
||||
const sheet = b.getByRole('dialog', { name: '채팅' });
|
||||
const input = sheet.locator('input[aria-label="메시지"]');
|
||||
await input.click();
|
||||
await input.pressSequentially('치는 중');
|
||||
for (let i = 1; i <= 3; i++) {
|
||||
await say(a, `치는 동안 온 메시지 ${i}`);
|
||||
await sheet.locator('.chat-line', { hasText: `치는 동안 온 메시지 ${i}` }).waitFor();
|
||||
}
|
||||
await b.waitForTimeout(150);
|
||||
if (!(await input.evaluate((el) => el === document.activeElement))) throw new Error('the chat box lost focus when a line arrived');
|
||||
await input.pressSequentially(' 계속');
|
||||
await input.press('Enter');
|
||||
await sheet.locator('.chat-line', { hasText: '치는 중 계속' }).waitFor();
|
||||
if (!(await input.evaluate((el) => el === document.activeElement))) throw new Error('the chat box lost focus after sending');
|
||||
await sheet.getByRole('button', { name: '닫기' }).click();
|
||||
});
|
||||
|
||||
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