diff --git a/tests/browser-capabilities/opfs-runtime.spec.ts b/tests/browser-capabilities/opfs-runtime.spec.ts index 59d42d64..3a4849f9 100644 --- a/tests/browser-capabilities/opfs-runtime.spec.ts +++ b/tests/browser-capabilities/opfs-runtime.spec.ts @@ -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