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>
23 lines
2.0 KiB
JavaScript
23 lines
2.0 KiB
JavaScript
import { createRequire } from "node:module";
|
|
import path from "node:path";
|
|
const { chromium } = createRequire(import.meta.url)(path.resolve("web/node_modules/playwright"));
|
|
const browser = await chromium.launch({ headless: true, executablePath: "/usr/bin/google-chrome-stable",
|
|
args: ["--no-sandbox","--use-gl=swiftshader","--enable-unsafe-swiftshader","--enable-unsafe-webgpu","--enable-dawn-features=allow_unsafe_apis","--use-webgpu-adapter=swiftshader"] });
|
|
const ctx = await browser.newContext({ viewport: { width: 1440, height: 900 } });
|
|
const page = await ctx.newPage();
|
|
await page.goto("http://127.0.0.1:5411/", { waitUntil: "domcontentloaded" });
|
|
await page.waitForFunction(() => document.body.innerText.includes("WASM ABI: ready"), undefined, { timeout: 120000 });
|
|
await page.getByTestId("blend-file-input").setInputFiles(path.resolve("tests/files/web/basic_scene.blend"));
|
|
await page.waitForFunction(() => /Active Basic/.test(document.querySelector('[data-testid="scene-stats"]')?.textContent ?? ""), undefined, { timeout: 120000 });
|
|
await page.waitForTimeout(2000);
|
|
await page.evaluate(() => { const b=[...document.querySelectorAll('nav[aria-label="工作区"] button')].find(x=>(x.textContent||"").trim()==="Scripting"); b?.click(); });
|
|
await page.waitForTimeout(15000);
|
|
console.log(JSON.stringify(await page.evaluate(() => ({
|
|
ws: document.querySelector("main")?.getAttribute("data-workspace"),
|
|
area: document.querySelector("main")?.getAttribute("data-editor-workflow-area"),
|
|
detail: (document.querySelector("main")?.getAttribute("data-last-diagnostic-detail")||"").slice(0,200),
|
|
textareas: [...document.querySelectorAll("textarea")].map(t => ({ aria: t.getAttribute("aria-label"), cls: t.className.slice(0,50), placeholder: t.getAttribute("placeholder") })),
|
|
consoleish: [...document.querySelectorAll("[class*=console],[data-testid*=console],[aria-label*=Console],[aria-label*=控制台]")].map(n => ({ tag: n.tagName, aria: n.getAttribute("aria-label"), cls: (n.className||"").toString().slice(0,60) })),
|
|
})), null, 1));
|
|
await browser.close();
|