Files
workinf_Blender_Wasm/web/tests/e2e/b3-seq-open-worker-probe.spec.ts
mes123456 f3e21c6b98
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
chore: checkpoint web Blender migration source, tools and docs
Accumulated uncommitted work: GHOST Web backend, WebGL/GPU web layer,
web workflow engine and protocol, tooling, docs and task records.
Large generated evidence, user-testing archives, build snapshots and
imported test assets remain untracked.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-10 11:18:01 +08:00

31 lines
1.5 KiB
TypeScript

import fs from "node:fs";
import path from "node:path";
import { test } from "@playwright/test";
const root = path.resolve(import.meta.dirname, "../../..");
test("capture worker errors for compressed blend open", async ({ page }) => {
test.setTimeout(180_000);
const lines: string[] = [];
page.on("worker", (worker) => {
worker.on("console", (message) => lines.push(`worker[${message.type()}]: ${message.text()}`.slice(0, 500)));
});
page.on("console", (message) => {
const text = message.text();
if (/error|Error|fail|Fail/.test(text)) lines.push(`page[${message.type()}]: ${text}`.slice(0, 500));
});
await page.goto("/");
await page.waitForFunction(() => Boolean((window as any).__nativeWorkflowEngine), null, { timeout: 60000 }).catch(() => {});
await page.waitForTimeout(8000);
lines.length = 0;
await page.getByTestId("blend-file-input").setInputFiles(path.join(root, "blender-5.2.0/tests/files/sequence_editing/sequence.blend"));
await page.waitForTimeout(35000);
const out = await page.evaluate(() => ({
projectId: (document.querySelector("main.blender-app") as HTMLElement | null)?.dataset.projectId ?? "",
status: document.querySelector('[data-testid="engine-status"]')?.textContent ?? "",
statusTitle: document.querySelector('[data-testid="engine-status"]')?.getAttribute("title") ?? "",
bodyText: document.body.innerText.replace(/\s+/g, " ").slice(0, 1200),
}));
fs.writeFileSync("/tmp/seq-open-worker.json", JSON.stringify({ ...(out as object), lines: lines.slice(-40) }, null, 2));
});