Files
workinf_Blender_Wasm/web/playwright.deployment-local.config.ts
mes123456 d1e6b63d54
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 feature-gap work, docs and tests
- update native web_engine sources and rebuilt wasm artifacts
- add task cards, status notes and tooling scripts
- add web e2e specs, tutorial UI sources and tutorial assets
- sync golden task manifests and audit records

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

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 ?? "5176", 10) || 5176;
const testOrigin = `http://127.0.0.1:${testPort}`;
export default defineConfig({
testDir: "tests/e2e",
timeout: 180_000,
expect: { timeout: 15_000 },
fullyParallel: false,
reporter: [["list"]],
use: {
baseURL: testOrigin,
...devices["Desktop Chrome"],
headless: true,
screenshot: "only-on-failure",
trace: "retain-on-failure",
launchOptions: {
...(chromePath ? { executablePath: chromePath } : {}),
args: ["--no-sandbox", "--use-gl=swiftshader", "--enable-unsafe-swiftshader", "--enable-unsafe-webgpu", "--enable-dawn-features=allow_unsafe_apis", "--use-webgpu-adapter=swiftshader"],
},
},
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,
},
});