PPPAIMT-Crest/playwright.config.js

35 lines
833 B
JavaScript

import { defineConfig } from '@playwright/test';
const dataKey = 'BwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwc=';
export default defineConfig({
testDir: 'e2e',
timeout: 180000,
globalSetup: './e2e/global-setup.js',
globalTeardown: './e2e/global-teardown.js',
use: {
baseURL: 'http://127.0.0.1:5173',
},
webServer: [
{
command: 'node src/server.js',
cwd: 'backend',
url: 'http://127.0.0.1:4000/api/health',
timeout: 120000,
env: {
PORT: '4000',
NODE_ENV: 'development',
DB_NAME: 'ppaimt_crest_test',
DATA_ENCRYPTION_KEY: dataKey,
TRUST_PROXY: 'false',
},
},
{
command: 'npx vite --port 5173 --strictPort --host 127.0.0.1',
cwd: 'frontend',
url: 'http://127.0.0.1:5173',
timeout: 120000,
},
],
});