From b1a6d943dea909d56ffc41367a0b9f60e255699d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E6=9C=94?= <565183519@qq.com> Date: Wed, 15 Jul 2026 17:19:18 +0800 Subject: [PATCH] test: allow smoke runs with an existing Chromium binary --- playwright.smoke.config.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/playwright.smoke.config.ts b/playwright.smoke.config.ts index c11fc6e..9e5f98f 100644 --- a/playwright.smoke.config.ts +++ b/playwright.smoke.config.ts @@ -2,6 +2,7 @@ import { defineConfig } from '@playwright/test' const baseURL = process.env.BASE_URL || 'http://127.0.0.1:41741' const port = new URL(baseURL).port || '41741' +const executablePath = process.env.PLAYWRIGHT_EXECUTABLE_PATH const reuseExistingServer = process.env.PLAYWRIGHT_REUSE_SERVER ? process.env.PLAYWRIGHT_REUSE_SERVER === '1' : process.env.CI !== 'true' @@ -28,7 +29,15 @@ export default defineConfig({ headless: true, storageState: claudeCodeOnboardingStorageState, }, - projects: [{ name: 'chromium', use: { browserName: 'chromium' } }], + projects: [ + { + name: 'chromium', + use: { + browserName: 'chromium', + ...(executablePath ? { launchOptions: { executablePath } } : {}), + }, + }, + ], webServer: { command: `node scripts/playwright-smoke-server.mjs ${port}`, url: baseURL,