forked from mirror/crumbs-original
38 lines
822 B
TypeScript
38 lines
822 B
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
globalSetup: './tests/e2e/global-setup.ts',
|
|
testDir: './tests/e2e',
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
reporter: 'html',
|
|
use: {
|
|
baseURL: 'http://localhost:4173',
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure'
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'setup',
|
|
testMatch: /auth\.spec\.ts/,
|
|
use: { ...devices['Desktop Chrome'] }
|
|
},
|
|
{
|
|
name: 'chromium',
|
|
testIgnore: /auth\.spec\.ts/,
|
|
dependencies: ['setup'],
|
|
use: { ...devices['Desktop Chrome'] }
|
|
}
|
|
],
|
|
webServer: {
|
|
command: 'pnpm build && pnpm preview --port 4173',
|
|
port: 4173,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120_000,
|
|
env: {
|
|
DATABASE_URL: './data/test-crumbs.db'
|
|
}
|
|
}
|
|
});
|