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>
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
import { execFileSync } from "node:child_process";
|
|
|
|
function resolveChromePath(): string | undefined {
|
|
if (process.env.CHROME_PATH) return process.env.CHROME_PATH;
|
|
try { return execFileSync("which", ["google-chrome"], { encoding: "utf8" }).trim() || undefined; }
|
|
catch { return undefined; }
|
|
}
|
|
|
|
const chromePath = resolveChromePath();
|
|
|
|
const testPort = Number.parseInt(process.env.WEB_TEST_PORT ?? "5174", 10) || 5174;
|
|
const testOrigin = `http://127.0.0.1:${testPort}`;
|
|
|
|
export default defineConfig({
|
|
testDir: "tests/e2e",
|
|
testMatch: ["cross-browser.spec.ts", "upstream-blendfile-versioning.spec.ts"],
|
|
timeout: 45_000,
|
|
expect: { timeout: 15_000 },
|
|
fullyParallel: false,
|
|
reporter: [["list"]],
|
|
projects: [
|
|
{ name: "chromium", use: { ...devices["Desktop Chrome"], launchOptions: { ...(chromePath ? { executablePath: chromePath } : {}), args: ["--no-sandbox", "--use-gl=swiftshader", "--enable-unsafe-swiftshader"] } } },
|
|
],
|
|
use: {
|
|
baseURL: testOrigin,
|
|
headless: true,
|
|
screenshot: "only-on-failure",
|
|
trace: "retain-on-failure",
|
|
},
|
|
webServer: {
|
|
command: `BLENDER_WEB_HTTP_PORT=${testPort} node ../tools/web/deployment-http-server.mjs "${process.env.WBV2_CASE_APP ?? 'dist'}"`,
|
|
url: testOrigin,
|
|
reuseExistingServer: false,
|
|
timeout: 30_000,
|
|
},
|
|
});
|