From d3260cb0cb22fb01757945781484a7fac9cfbf3f Mon Sep 17 00:00:00 2001 From: mes123456 Date: Wed, 2 Dec 2026 19:01:17 +0800 Subject: [PATCH] test(web): give the scene settings clients an in-memory engine The spec built two persistent WebEngineClient instances inside the editor page, but the page's own editor owns the exclusive native-files Web Lock for /browser, so whichever side won the startup race decided the run. The clients only need an in-memory Main and save/reopen through bytes, so they now start as ephemeral instances, the same pattern the armature coverage spec already uses. Co-Authored-By: Claude Fable 5.2 --- .../e2e/wbv2-scene-settings-expanded-production.spec.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/tests/e2e/wbv2-scene-settings-expanded-production.spec.ts b/web/tests/e2e/wbv2-scene-settings-expanded-production.spec.ts index 10b4d110d..e82a3332d 100644 --- a/web/tests/e2e/wbv2-scene-settings-expanded-production.spec.ts +++ b/web/tests/e2e/wbv2-scene-settings-expanded-production.spec.ts @@ -12,8 +12,11 @@ test("WBV2-P1129-001 covers the remaining Scene settings Main commands", async ( await page.goto("/"); const result = await page.evaluate(async (bytes) => { const { WebEngineClient } = await import("/src/engine-client/WebEngineClient.ts"); - const client = new WebEngineClient({ timeoutMs: 60_000 }); - const reopenedClient = new WebEngineClient({ timeoutMs: 60_000 }); + /* The page's own editor owns the exclusive native-files Web Lock, so a second + * persistent engine in the same page can never start. These clients only need + * an in-memory Main and save/reopen through bytes. */ + const client = new WebEngineClient({ timeoutMs: 60_000, nativeFiles: false }); + const reopenedClient = new WebEngineClient({ timeoutMs: 60_000, nativeFiles: false }); const digest = async (value: ArrayBuffer): Promise => { const hash = await crypto.subtle.digest("SHA-256", value); return Array.from(new Uint8Array(hash), (byte) => byte.toString(16).padStart(2, "0")).join("");