Advance M7 workflows and release operations
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
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}`;
|
||||
@@ -11,7 +20,7 @@ export default defineConfig({
|
||||
fullyParallel: false,
|
||||
reporter: [["list"]],
|
||||
projects: [
|
||||
{ name: "chromium", use: { ...devices["Desktop Chrome"], launchOptions: { executablePath: process.env.CHROME_PATH ?? "/home/mes123456/.local/bin/google-chrome", args: ["--no-sandbox", "--use-gl=swiftshader", "--enable-unsafe-swiftshader"] } } },
|
||||
{ name: "chromium", use: { ...devices["Desktop Chrome"], launchOptions: { ...(chromePath ? { executablePath: chromePath } : {}), args: ["--no-sandbox", "--use-gl=swiftshader", "--enable-unsafe-swiftshader"] } } },
|
||||
],
|
||||
use: {
|
||||
baseURL: testOrigin,
|
||||
|
||||
Reference in New Issue
Block a user