Clarify storage limits and unify file metadata displays

This commit is contained in:
2026-10-15 11:23:33 +09:00
parent 3786baf60c
commit 471e2653d8
22 changed files with 401 additions and 84 deletions

View File

@@ -150,20 +150,42 @@ try {
await admin.locator('.admin-file').filter({ hasText: 'sample.mp4' }).waitFor();
assert.match(await admin.locator('.admin-file').innerText(), /중국 · Beijing/);
assert.match(await admin.locator('.admin-file').innerText(), /1\.1\.1\.1/);
assert.match(await admin.locator('.admin-file-info').first().innerText(), /^\[.+\]\s+guest-/);
assert.match(await admin.locator('.admin-file').innerText(), /접속 지역 · 중국 · Beijing/);
assert.doesNotMatch(await admin.locator('.admin-file').innerText(), /최근 접속/);
assert.match(
await admin.locator('.admin-file footer small').innerText(),
/^\[보관 만료\] \d{4}년 \d{1,2}월 \d{1,2}일 \d{2}:\d{2} 까지$/,
);
await admin.getByRole('button', { name: '신규 업로드 중지', exact: true }).click();
await admin.getByText('신규 업로드 중지됨', { exact: true }).waitFor();
assert.equal(runtime.service.admin.state.uploadsPaused, true);
await admin.getByRole('button', { name: '업로드 재개', exact: true }).click();
await admin.getByText('신규 업로드 허용 중', { exact: true }).waitFor();
await admin.getByRole('button', { name: '접속 · 용량 설정', exact: true }).click();
assert.match(
await admin.locator('.admin-limit-details').innerText(),
/로그인 보관함[\s\S]*계정당 2\.1GB/,
);
assert.match(
await admin.locator('.admin-limit-details').innerText(),
/기기 전송 업로드[\s\S]*기기 세션당 2\.1GB/,
);
await admin.getByRole('button', { name: '설정 저장', exact: true }).click();
await admin.getByText('관리 설정을 저장했어요.', { exact: true }).waitFor();
assert.equal(
runtime.service.admin.state.totalStorageLimitMb,
20480,
'rounded GB presentation must not change the stored quota',
);
await admin.getByLabel('동시에 처리할 업로드 수').fill('3');
await admin.getByLabel('전체 파일 저장 한도 (GiB)').fill('16');
await admin.getByLabel('전체 파일 저장 한도 (GB)').fill('16');
await admin.getByLabel('차단할 국가 코드').fill('CN');
await admin.getByLabel('차단할 IP 또는 IP 대역').fill('9.9.9.0/24');
await admin.getByRole('button', { name: '설정 저장', exact: true }).click();
await admin.getByText('관리 설정을 저장했어요.', { exact: true }).waitFor();
assert.equal(runtime.service.admin.state.maxConcurrentUploads, 3);
assert.equal(runtime.service.admin.state.totalStorageLimitMb, 16384);
assert.equal(runtime.service.admin.state.totalStorageLimitMb, Math.round(16e9 / 1048576));
assert.deepEqual(runtime.service.admin.state.blockedCountries, ['CN']);
assert.equal(await sender.evaluate(async () => (await fetch('/api/device/me')).status), 403);
await admin.getByRole('button', { name: '저장 파일', exact: true }).click();