Files
tolaria/playwright.smoke.config.ts

41 lines
1000 B
TypeScript
Raw Permalink Normal View History

2026-04-07 19:22:11 +02:00
import { defineConfig } from '@playwright/test'
2026-04-08 15:22:53 +02:00
const baseURL = process.env.BASE_URL || 'http://127.0.0.1:41741'
const port = new URL(baseURL).port || '41741'
const reuseExistingServer = process.env.PLAYWRIGHT_REUSE_SERVER
? process.env.PLAYWRIGHT_REUSE_SERVER === '1'
: process.env.CI !== 'true'
const claudeCodeOnboardingStorageState = {
cookies: [],
origins: [
{
origin: baseURL,
localStorage: [
{ name: 'tolaria:claude-code-onboarding-dismissed', value: '1' },
],
},
],
}
2026-04-07 19:22:11 +02:00
export default defineConfig({
testDir: './tests',
timeout: 30_000,
retries: 1,
workers: 1,
grep: /@smoke/,
use: {
baseURL,
headless: true,
storageState: claudeCodeOnboardingStorageState,
2026-04-07 19:22:11 +02:00
},
projects: [{ name: 'chromium', use: { browserName: 'chromium' } }],
webServer: {
2026-04-25 19:51:41 +02:00
command: `node scripts/playwright-smoke-server.mjs ${port}`,
2026-04-07 19:22:11 +02:00
url: baseURL,
2026-04-08 15:22:53 +02:00
reuseExistingServer,
2026-04-08 17:53:49 +02:00
timeout: 30_000,
stdout: 'pipe',
stderr: 'pipe',
2026-04-07 19:22:11 +02:00
},
})