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>
This commit is contained in:
37
web/tests/e2e/b3-props-context-probe.spec.ts
Normal file
37
web/tests/e2e/b3-props-context-probe.spec.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { test } from "@playwright/test";
|
||||
import { observeNative } from "../fixtures/native-ui-workflow";
|
||||
|
||||
const root = path.resolve(import.meta.dirname, "../../..");
|
||||
|
||||
test("read raw properties contexts of a failing blend", async ({ page }) => {
|
||||
test.setTimeout(180_000);
|
||||
await observeNative(page);
|
||||
await page.goto("/");
|
||||
await page.getByTestId("blend-file-input").setInputFiles(path.join(root, "blender-5.2.0/tests/files/io_tests/blend_geometry/all_quads.blend"));
|
||||
await page.waitForTimeout(30000);
|
||||
const out = await page.evaluate(async () => {
|
||||
const worker = (window as any).__nativeWorkflowEngine as Worker | undefined;
|
||||
if (!worker) return { error: "no worker" };
|
||||
const raw = await new Promise<any>((resolve, reject) => {
|
||||
const requestId = `ctx-${crypto.randomUUID()}`;
|
||||
const receive = (event: MessageEvent) => {
|
||||
if (event.data?.requestId !== requestId || event.data?.kind !== 'result') return;
|
||||
worker.removeEventListener('message', receive);
|
||||
if (event.data.ok) resolve(event.data.result); else reject(new Error(`${event.data.error?.code}: ${event.data.error?.message}`));
|
||||
};
|
||||
worker.addEventListener('message', receive);
|
||||
worker.postMessage({ requestId, command: { type: 'snapshot' } });
|
||||
});
|
||||
const workflow = raw?.snapshot?.editorWorkflow;
|
||||
const contexts: unknown[] = [];
|
||||
for (const workspace of workflow?.workspaces ?? []) {
|
||||
for (const area of workspace.areas ?? []) {
|
||||
if (area?.space?.properties) contexts.push({ workspace: workspace.id, area: area.id, editor: area.editor, context: area.space.properties.context, hasData: area.space.properties.data != null, dataFields: area.space.properties.data?.fields?.length ?? null });
|
||||
}
|
||||
}
|
||||
return { status: raw?.snapshot?.editorWorkflowStatus, contexts };
|
||||
}).catch((error) => ({ error: String(error) }));
|
||||
fs.writeFileSync("/tmp/props-context.json", JSON.stringify(out, null, 2));
|
||||
});
|
||||
Reference in New Issue
Block a user