Refine vault defaults and account settings

This commit is contained in:
2026-10-13 14:20:17 +09:00
parent 8a8df417aa
commit 50e54bc4c5
10 changed files with 351 additions and 75 deletions

View File

@@ -300,12 +300,10 @@ try {
.getByRole('button', { name: '저장', exact: true })
.boundingBox();
assert.equal(mobileInput.height, mobileSave.height);
await page.getByRole('switch', { name: '다른 기기에서 발견 허용' }).waitFor();
assert.equal(
await page
.locator('.discovery-setting')
.evaluate((el) => getComputedStyle(el).borderBottomWidth),
'0px',
await settings.getByRole('switch', { name: '다른 기기에서 발견 허용' }).count(),
0,
'발견 허용 설정을 표시하지 않음',
);
const settingsBounds = await settings.boundingBox();
assert(Math.abs(settingsBounds.y + settingsBounds.height - 900) < 2, '모바일 설정 하단 시트');
@@ -381,12 +379,30 @@ try {
assert.equal(await page.locator('.name-count').innerText(), '9/40');
await page.getByRole('button', { name: '저장', exact: true }).click();
await page.locator('.footer-device-name').filter({ hasText: '나의 테스트 기기' }).waitFor();
await page.locator('.footer-device-summary').click();
await page.getByLabel('다른 기기에서 발견 허용').uncheck();
const oldSession = await page.evaluate(async () => {
const session = await (
await fetch('/api/guest/session', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: '{}',
})
).json();
const response = await fetch('/api/device/me', {
method: 'PATCH',
headers: { 'Content-Type': 'application/json', 'X-CSRF-Token': session.csrfToken },
body: JSON.stringify({ discoverable: false }),
});
return { deviceId: session.device.id, ok: response.ok };
});
assert.equal(oldSession.ok, true);
await page.locator('.footer-device-summary').filter({ hasText: '발견 꺼짐' }).waitFor();
await page.getByLabel('다른 기기에서 발견 허용').check();
await page.reload();
await page.locator('.footer-device-summary').filter({ hasText: '발견 허용' }).waitFor();
await page.getByRole('button', { name: '대화상자 닫기', exact: true }).click();
assert.equal(await page.locator('.footer-device-name').innerText(), '나의 테스트 기기');
assert.equal(
await page.evaluate(async () => (await (await fetch('/api/device/snapshot')).json()).device.id),
oldSession.deviceId,
);
await page.getByRole('button', { name: '다른 기기 연결', exact: true }).click();
assert.equal(await page.locator('.connection-choice').count(), 2);
assert.equal(await page.getByRole('checkbox', { name: '참여할 때 내 승인 받기' }).count(), 0);
@@ -436,7 +452,7 @@ try {
await page.waitForFunction(() => document.querySelectorAll('.peer-card').length === 12);
assert.deepEqual(errors, []);
console.log(
'PASS: 실제 12대 자동 발견, 4/3/2열과 줄바꿈, 푸터의 내 기기 상태·이름/발견 설정, 선택 전 전송 UI 없음, 고정 크기 PC 모달·모바일 하단 시트, 하나의 전송 버튼과 파일/링크 대체, Escape, QR 참여 시 모달 자동 닫힘, 방 안의 기기 격리·나가기 후 주변 복귀.',
'PASS: 실제 12대 자동 발견, 4/3/2열과 줄바꿈, 푸터의 기기명 설정·발견 옵션 숨김·이전 비공개 세션의 재접속 후 발견 복구, 선택 전 전송 UI 없음, 고정 크기 PC 모달·모바일 하단 시트, 하나의 전송 버튼과 파일/링크 대체, Escape, QR 참여 시 모달 자동 닫힘, 방 안의 기기 격리·나가기 후 주변 복귀.',
);
} finally {
for (const socket of sockets) socket.disconnect();