test(opfs): 다른 탭 시험 둘이 지원 판정 결과를 조용히 넘기지 않고 단언한다
문제: OPFS 05-01 브라우저 시험 둘(다른 탭 purge가 진행 중 put을 기다림, 다른 탭 reconcile이 진행 중 put을 건너뜀)은 OPFS runtime을 설치하지 못하면 `return`으로 끝나 단언 0개로 통과했고, capability 증거는 "zero skipped"를 적었다. desktop 실행에서 Playwright의 WebKit이 바로 그 경우였다(세 케이스가 지원 판정 거절로 끝남). 같은 파일 첫 시험은 그 엔진에서 UNSUPPORTED를 단언한다. 고친 것: WebKit에서는 지원 판정이 거절함을 단언하고 끝낸다. 다른 엔진은 설치 성공을 단언한다. 그래서 chromium·firefox가 지원을 잃거나 WebKit이 지원을 얻으면 시험이 실패해 알린다. 버린 대안: 미지원 엔진을 quarantine skip으로 두는 안은 capability 증거 검사(`scripts/verify-browser-capability-evidence.ts`)가 skipped 노드를 거절해, 증거 규칙(게이트 기준)을 낮춰야 해서 하지 않았다. 문서 (`docs/operations/ci-quality-gates.md`)도 미지원 엔진은 skip하지 않고 명시적 UNSUPPORTED를 검증한다고 적는다. 검증: desktop `playwright test --config playwright.capabilities.config.ts tests/browser-capabilities/opfs-runtime.spec.ts` 세 엔진 12건 통과. 이른 return을 단언으로 바꾸기만 한 판(실험 E-02)에서는 WebKit 세 케이스가 실패했다. Refs: 1112/03-02
This commit is contained in:
@@ -337,6 +337,7 @@ async function removeOpfsAuthority(
|
||||
for (const committedObjects of [0, 3]) {
|
||||
test(`05-01 an approved purge in another tab waits for a live put and takes it with the partition (${committedObjects} committed objects)`, async ({
|
||||
page,
|
||||
browserName,
|
||||
}) => {
|
||||
const secondPage = await page.context().newPage();
|
||||
const suffix = crypto.randomUUID().replaceAll("-", "");
|
||||
@@ -349,7 +350,18 @@ for (const committedObjects of [0, 3]) {
|
||||
type Tab = import("../../src/adapters/storage/opfs/browser-opfs-runtime.ts").BrowserOpfsRuntime;
|
||||
try {
|
||||
await Promise.all([page.goto("/"), secondPage.goto("/")]);
|
||||
if (!(await installOpfsTab(page, scope))) return;
|
||||
// 1112/03-02. An early return here passed with no assertion on an engine
|
||||
// the support check refused, while the evidence said zero skipped.
|
||||
// Playwright's WebKit is refused (the first test asserts its UNSUPPORTED
|
||||
// result), so there this asserts the refusal; every other engine must
|
||||
// open the runtime. A skip is no way out: the capability evidence
|
||||
// refuses skipped cases (scripts/verify-browser-capability-evidence.ts).
|
||||
const installed = await installOpfsTab(page, scope);
|
||||
if (browserName === "webkit") {
|
||||
expect(installed, "the OPFS support check refuses Playwright's WebKit").toBe(false);
|
||||
return;
|
||||
}
|
||||
expect(installed, "OPFS runtime supported in this engine").toBe(true);
|
||||
expect(await installOpfsTab(secondPage, scope, true)).toBe(true);
|
||||
|
||||
const seeded = await secondPage.evaluate(async (count) => {
|
||||
@@ -455,6 +467,7 @@ for (const committedObjects of [0, 3]) {
|
||||
|
||||
test("05-01 a reconcile in another tab skips a live put and the put stays readable", async ({
|
||||
page,
|
||||
browserName,
|
||||
}) => {
|
||||
const secondPage = await page.context().newPage();
|
||||
const suffix = crypto.randomUUID().replaceAll("-", "");
|
||||
@@ -467,7 +480,13 @@ test("05-01 a reconcile in another tab skips a live put and the put stays readab
|
||||
type Tab = import("../../src/adapters/storage/opfs/browser-opfs-runtime.ts").BrowserOpfsRuntime;
|
||||
try {
|
||||
await Promise.all([page.goto("/"), secondPage.goto("/")]);
|
||||
if (!(await installOpfsTab(page, scope))) return;
|
||||
// 1112/03-02. Asserted, not returned early: see the purge test above.
|
||||
const installed = await installOpfsTab(page, scope);
|
||||
if (browserName === "webkit") {
|
||||
expect(installed, "the OPFS support check refuses Playwright's WebKit").toBe(false);
|
||||
return;
|
||||
}
|
||||
expect(installed, "OPFS runtime supported in this engine").toBe(true);
|
||||
expect(await installOpfsTab(secondPage, scope)).toBe(true);
|
||||
|
||||
// Tab A starts a put whose source stalls, so its journal row stays
|
||||
|
||||
Reference in New Issue
Block a user