chore(web): continuous handoff WBV2-P1272-001
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-09-04 13:47:48 +08:00
parent 9ab511cce1
commit e6fb98a406
13 changed files with 29395 additions and 8 deletions

View File

@@ -4,8 +4,12 @@ import fs from "node:fs";
import path from "node:path";
const root = path.resolve(import.meta.dirname, "../../..");
const fixture = fs.readFileSync(path.join(root, "tests/files/web/basic_scene.blend"));
const fixturePath = process.env.WBV2_BATCH_FIXTURE ?? "tests/files/web/basic_scene.blend";
const fixture = fs.readFileSync(path.join(root, fixturePath));
const fixtureSha256 = crypto.createHash("sha256").update(fixture).digest("hex");
const task = process.env.WBV2_BATCH_TASK ?? "WBV2-P19-002";
const productionPath = process.env.WBV2_BATCH_PRODUCTION ?? `tests/golden/${task}/object-parent-production.json`;
const sourceUnits = JSON.parse(process.env.WBV2_BATCH_UNITS ?? "[\"operator:OBJECT_OT_parent_set\"]") as string[];
test("WBV2-P19-002 binds setParent to compiled WASM Main", async ({ page }) => {
test.setTimeout(120_000);
@@ -38,9 +42,8 @@ test("WBV2-P19-002 binds setParent to compiled WASM Main", async ({ page }) => {
}
}, Array.from(fixture));
fs.mkdirSync(path.join(root, "tests/golden/WBV2-P19-002"), { recursive: true });
const output = process.env.WBV2_PARENT_REPORT ?? "object-parent-production.json";
fs.writeFileSync(path.join(root, "tests/golden/WBV2-P19-002", output), `${JSON.stringify({ schemaVersion: 1, task: "WBV2-P19-002", operation: "OBJECT_PARENT_ENGINE_CHROMIUM", queueMutation: false, fixtureSha256, ...result }, null, 2)}\n`);
fs.mkdirSync(path.dirname(path.join(root, productionPath)), { recursive: true });
fs.writeFileSync(path.join(root, productionPath), `${JSON.stringify({ schemaVersion: 1, task, operation: "OBJECT_PARENT_ENGINE_CHROMIUM", browser: "chromium", queueMutation: false, fixture: fixturePath, fixtureSha256, sourceUnits, ...result }, null, 2)}\n`);
expect(result.browser).toBe("chromium");
expect(result.parentAfter).toBe(result.parentId);
expect(result.createRevision).toBe(result.baseRevision + 1);