skillhub/web/playwright.config.ts
XiaoSeS b81af32f14
test(e2e): align market regression coverage and bound CI runs (#1108)
* test(e2e): report progress and bound CI execution

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

* test(e2e): align market and namespace search assertions

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

* test(e2e): scope landing action and document fixture boundaries

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

* test(e2e): refresh remaining market control selectors

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

* test(e2e): disambiguate skill page title from overview

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

---------

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-11-20 00:07:38 +08:00

43 lines
1.2 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test'
const localNoProxyHosts = ['localhost', '127.0.0.1', '::1']
const mergedNoProxy = Array.from(new Set([
...(process.env.NO_PROXY?.split(',').filter(Boolean) ?? []),
...(process.env.no_proxy?.split(',').filter(Boolean) ?? []),
...localNoProxyHosts,
])).join(',')
process.env.NO_PROXY = mergedNoProxy
process.env.no_proxy = mergedNoProxy
const externalBaseUrl = process.env.PLAYWRIGHT_BASE_URL
const baseURL = externalBaseUrl ?? 'http://127.0.0.1:3000'
export default defineConfig({
testDir: './e2e',
fullyParallel: false,
timeout: process.env.CI ? 90_000 : 45_000,
globalTimeout: process.env.CI ? 30 * 60_000 : undefined,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: Number(process.env.PLAYWRIGHT_WORKERS ?? 1),
reporter: [['line'], ['html', { open: 'never' }]],
use: {
baseURL,
trace: 'on-first-retry',
screenshot: 'on',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: externalBaseUrl
? undefined
: {
command: 'pnpm exec vite --host 127.0.0.1 --port 3000 --strictPort',
url: baseURL,
reuseExistingServer: true,
timeout: 120000,
},
})