guanghu/playwright.smoke.config.ts
冰朔 8739805f99
Some checks failed
Auto-update PR branches / Update open PR branches (push) Has been cancelled
CI / Frontend Static Quality Checks (push) Has been cancelled
CI / Frontend Tests & Coverage (push) Has been cancelled
CI / Rust Tests & Quality Checks (push) Has been cancelled
CI / Linux build verification (push) Has been cancelled
Release (Alpha) / Compute alpha version (push) Has been cancelled
Release (Alpha) / Build release artifacts (push) Has been cancelled
Release (Alpha) / GitHub Release (alpha) (push) Has been cancelled
Release (Alpha) / Update docs and release pages (push) Has been cancelled
Deploy docs / Build VitePress site (push) Has been cancelled
Deploy docs / Deploy to GitHub Pages (push) Has been cancelled
光湖开源源码快照 · Tolaria AGPL 分叉基线 · 独立更新链
2026-07-05 17:45:16 +08:00

41 lines
1000 B
TypeScript

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 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' },
],
},
],
}
export default defineConfig({
testDir: './tests',
timeout: 30_000,
retries: 1,
workers: 1,
grep: /@smoke/,
use: {
baseURL,
headless: true,
storageState: claudeCodeOnboardingStorageState,
},
projects: [{ name: 'chromium', use: { browserName: 'chromium' } }],
webServer: {
command: `node scripts/playwright-smoke-server.mjs ${port}`,
url: baseURL,
reuseExistingServer,
timeout: 30_000,
stdout: 'pipe',
stderr: 'pipe',
},
})