From de265cdde6216a692839c35ea8fe5d1bf1f9e90e Mon Sep 17 00:00:00 2001 From: huojiarong Date: Mon, 3 Aug 2026 07:03:13 +0000 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4Playwright=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/playwright.config.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/playwright.config.ts b/frontend/playwright.config.ts index ebfb68a..f75f658 100644 --- a/frontend/playwright.config.ts +++ b/frontend/playwright.config.ts @@ -1,5 +1,8 @@ import { defineConfig } from "@playwright/test"; +const channel = process.env.PLAYWRIGHT_CHANNEL?.trim(); +const executablePath = process.env.PLAYWRIGHT_EXECUTABLE_PATH?.trim(); + export default defineConfig({ testDir: "./tests/e2e", fullyParallel: false, @@ -10,7 +13,8 @@ export default defineConfig({ }, use: { baseURL: "http://127.0.0.1:4173", - channel: "msedge", + ...(channel ? { channel } : {}), + ...(executablePath ? { launchOptions: { executablePath } } : {}), headless: true, viewport: { width: 1440, height: 900 }, screenshot: "only-on-failure",