Kord/apps/dashboard/playwright.config.ts

37 lines
1010 B
TypeScript

import { defineConfig, devices } from '@playwright/test';
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
// CI 서버 환경일 때만 실패 시 재시도
retries: process.env.CI ? 2 : 0,
// TDD 기반 개발 시 로컬에선 워커를 적당히 둡니다
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
use: {
// 서버가 켜져있을 경우 기본 URL을 세팅
baseURL: 'http://127.0.0.1:3000',
trace: 'on-first-retry',
},
globalSetup: require.resolve('./playwright.global-setup.ts'),
// Dashboard 웹서버와 gRPC Bot을 테스트 전에 띄우고 테스트가 끝나면 자동으로 종료하는 옵션
webServer: {
command: 'cd ../.. && yarn dev',
url: 'http://127.0.0.1:3000',
reuseExistingServer: !process.env.CI,
timeout: 120 * 1000,
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
});