2026-02-14 18:25:11 +01:00
|
|
|
import { defineConfig } from '@playwright/test'
|
|
|
|
|
|
2026-04-12 20:10:01 +02:00
|
|
|
const baseURL = process.env.BASE_URL || 'http://localhost:5201'
|
|
|
|
|
const claudeCodeOnboardingStorageState = {
|
|
|
|
|
cookies: [],
|
|
|
|
|
origins: [
|
|
|
|
|
{
|
|
|
|
|
origin: baseURL,
|
|
|
|
|
localStorage: [
|
|
|
|
|
{ name: 'tolaria:claude-code-onboarding-dismissed', value: '1' },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-14 18:25:11 +01:00
|
|
|
export default defineConfig({
|
2026-03-06 09:39:20 +01:00
|
|
|
testDir: './tests/smoke',
|
2026-03-25 14:52:04 +01:00
|
|
|
timeout: 20_000,
|
2026-03-15 23:40:47 +01:00
|
|
|
retries: 2,
|
2026-02-14 21:29:04 +01:00
|
|
|
workers: 1,
|
2026-02-14 18:25:11 +01:00
|
|
|
use: {
|
2026-04-12 20:10:01 +02:00
|
|
|
baseURL,
|
2026-03-06 09:39:20 +01:00
|
|
|
headless: true,
|
2026-04-12 20:10:01 +02:00
|
|
|
storageState: claudeCodeOnboardingStorageState,
|
2026-02-14 18:25:11 +01:00
|
|
|
},
|
2026-03-06 09:39:20 +01:00
|
|
|
projects: [{ name: 'chromium', use: { browserName: 'chromium' } }],
|
2026-02-14 18:25:11 +01:00
|
|
|
webServer: {
|
2026-03-06 09:39:20 +01:00
|
|
|
command: `pnpm dev --port ${process.env.BASE_URL?.match(/:(\d+)/)?.[1] || '5201'}`,
|
2026-04-12 20:10:01 +02:00
|
|
|
url: baseURL,
|
2026-02-14 18:25:11 +01:00
|
|
|
reuseExistingServer: true,
|
|
|
|
|
},
|
|
|
|
|
})
|