From a7447db9f0825eb8d35680025687dfc68fd0129c Mon Sep 17 00:00:00 2001 From: mes123456 Date: Wed, 2 Dec 2026 21:17:21 +0800 Subject: [PATCH] test(web): give the NLA stack clients an in-memory engine The spec started two persistent WebEngineClient instances inside the editor page, which the page's own editor excludes from the native-files Web Lock, so the run depended on a startup race. The clients only need an in-memory Main and now start in the same ephemeral mode the armature coverage spec uses. Co-Authored-By: Claude Fable 5.2 --- web/tests/e2e/wbv2-nla-stack-production.spec.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/tests/e2e/wbv2-nla-stack-production.spec.ts b/web/tests/e2e/wbv2-nla-stack-production.spec.ts index df844963a..12f788c65 100644 --- a/web/tests/e2e/wbv2-nla-stack-production.spec.ts +++ b/web/tests/e2e/wbv2-nla-stack-production.spec.ts @@ -12,8 +12,11 @@ test("WBV2-P1112-000 preserves setNLAStack Main submission and rejects invalid a await page.goto("/"); const result = await page.evaluate(async (input) => { 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; a second + * persistent engine in the same page can never start. Only an in-memory Main + * is needed here. */ + const client = new WebEngineClient({ timeoutMs: 60_000, nativeFiles: false }); + const reopenedClient = new WebEngineClient({ timeoutMs: 60_000, nativeFiles: false }); const stack = (snapshot: any) => JSON.stringify(snapshot.nlaTracks ?? []); try { const opened = await client.openBlend(Uint8Array.from(input.bytes).buffer);