This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { defineConfig, devices } from '@playwright/test'
|
||||
|
||||
const liveAuthentication = Boolean(
|
||||
process.env.DEVRUNBOOK_E2E_EMAIL && process.env.DEVRUNBOOK_E2E_PASSWORD,
|
||||
)
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './tests/e2e',
|
||||
fullyParallel: true,
|
||||
workers: process.env.CI ? 2 : 4,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
reporter: [['list'], ['html', { open: 'never' }]],
|
||||
globalSetup: liveAuthentication ? './tests/e2e/global-setup.ts' : undefined,
|
||||
use: {
|
||||
baseURL: process.env.PLAYWRIGHT_BASE_URL ?? 'http://127.0.0.1:3000',
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
webServer: process.env.PLAYWRIGHT_BASE_URL
|
||||
? undefined
|
||||
: {
|
||||
command: 'pnpm --filter @devrunbook/web dev',
|
||||
url: 'http://127.0.0.1:3000/health/live',
|
||||
reuseExistingServer: !process.env.CI,
|
||||
timeout: 120_000,
|
||||
},
|
||||
projects: [
|
||||
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
|
||||
{ name: 'narrow', use: { ...devices['Pixel 7'] } },
|
||||
],
|
||||
})
|
||||
Reference in New Issue
Block a user