import path from 'node:path'; import base from './playwright.config'; const candidate = process.env.WBV2_PRODUCTION_CANDIDATE ?? path.resolve(import.meta.dirname, '../build_web_main_desktop/versioning-filepath-20261101/app'); const specs = (process.env.WBV2_MODULE_SPECS ?? 'smoke.spec.ts').split(',').map(s => s.trim()).filter(Boolean); const port = Number(process.env.WEB_TEST_PORT ?? 5480); const origin = `http://127.0.0.1:${port}`; if (!specs.length) throw new Error('WBV2_MODULE_SPECS is empty'); export default { ...base, testMatch: specs, timeout: Number(process.env.WBV2_MODULE_TIMEOUT ?? 300_000), retries: 0, workers: 1, use: { ...base.use, baseURL: origin, viewport: { width: 1440, height: 900 }, launchOptions: { ...base.use?.launchOptions, args: [...((base.use?.launchOptions?.args as string[] | undefined) ?? []) .filter(a => !a.startsWith('--use-gl=') && !a.startsWith('--use-angle=')), '--use-gl=angle', '--use-angle=swiftshader', '--enable-unsafe-swiftshader'], }, }, webServer: { command: `BLENDER_WEB_HTTP_PORT=${port} node ../tools/web/deployment-http-server.mjs '${candidate}'`, url: origin, reuseExistingServer: false, timeout: 60_000, }, };