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>
22 lines
1.9 KiB
JavaScript
22 lines
1.9 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 }, acceptDownloads: true });
|
|
const page = await ctx.newPage();
|
|
await page.goto("http://127.0.0.1:5401/", { 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);
|
|
const dump = await page.evaluate(() => ({
|
|
ariaLabels: [...document.querySelectorAll("[aria-label]")].map((n) => n.getAttribute("aria-label")),
|
|
buttons: [...document.querySelectorAll("button")].map((n) => (n.textContent || n.getAttribute("aria-label") || "").trim()).filter(Boolean).slice(0, 80),
|
|
dataAttrs: [...new Set([...document.querySelectorAll("*")].flatMap((n) => [...n.attributes].map((a) => a.name).filter((x) => x.startsWith("data-"))))],
|
|
workspaces: [...document.querySelectorAll("nav[aria-label]")].map((nav) => ({ nav: nav.getAttribute("aria-label"), tabs: [...nav.querySelectorAll("button")].map((b) => (b.textContent || "").trim()) })),
|
|
mainAttrs: [...document.querySelectorAll("main")].map((m) => [...m.attributes].map((a) => `${a.name}=${a.value}`)),
|
|
}));
|
|
console.log(JSON.stringify(dump, null, 1).slice(0, 6000));
|
|
await browser.close();
|