test: allow smoke runs with an existing Chromium binary
This commit is contained in:
parent
484ff19bb2
commit
b1a6d943de
@ -2,6 +2,7 @@ import { defineConfig } from '@playwright/test'
|
|||||||
|
|
||||||
const baseURL = process.env.BASE_URL || 'http://127.0.0.1:41741'
|
const baseURL = process.env.BASE_URL || 'http://127.0.0.1:41741'
|
||||||
const port = new URL(baseURL).port || '41741'
|
const port = new URL(baseURL).port || '41741'
|
||||||
|
const executablePath = process.env.PLAYWRIGHT_EXECUTABLE_PATH
|
||||||
const reuseExistingServer = process.env.PLAYWRIGHT_REUSE_SERVER
|
const reuseExistingServer = process.env.PLAYWRIGHT_REUSE_SERVER
|
||||||
? process.env.PLAYWRIGHT_REUSE_SERVER === '1'
|
? process.env.PLAYWRIGHT_REUSE_SERVER === '1'
|
||||||
: process.env.CI !== 'true'
|
: process.env.CI !== 'true'
|
||||||
@ -28,7 +29,15 @@ export default defineConfig({
|
|||||||
headless: true,
|
headless: true,
|
||||||
storageState: claudeCodeOnboardingStorageState,
|
storageState: claudeCodeOnboardingStorageState,
|
||||||
},
|
},
|
||||||
projects: [{ name: 'chromium', use: { browserName: 'chromium' } }],
|
projects: [
|
||||||
|
{
|
||||||
|
name: 'chromium',
|
||||||
|
use: {
|
||||||
|
browserName: 'chromium',
|
||||||
|
...(executablePath ? { launchOptions: { executablePath } } : {}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
webServer: {
|
webServer: {
|
||||||
command: `node scripts/playwright-smoke-server.mjs ${port}`,
|
command: `node scripts/playwright-smoke-server.mjs ${port}`,
|
||||||
url: baseURL,
|
url: baseURL,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user