Spaces:
Sleeping
Sleeping
| import 'dotenv/config'; | |
| import { defineConfig, devices } from '@playwright/test'; | |
| const frontendPort = process.env.E2E_PORT ?? '5000'; | |
| const frontendUrl = `http://127.0.0.1:${frontendPort}`; | |
| export default defineConfig({ | |
| testDir: './e2e', | |
| outputDir: './test-results/e2e/artifacts', | |
| reporter: [ | |
| ['list'], | |
| ['json', { outputFile: 'test-results/e2e/playwright-json/results.json' }], | |
| ['html', { outputFolder: 'test-results/e2e/html', open: 'never' }], | |
| ], | |
| use: { | |
| baseURL: frontendUrl, | |
| trace: 'retain-on-failure', | |
| screenshot: 'only-on-failure', | |
| }, | |
| webServer: [ | |
| { | |
| command: 'npm run backend:dev', | |
| url: 'http://127.0.0.1:3000/health', | |
| reuseExistingServer: true, | |
| timeout: 120_000, | |
| }, | |
| { | |
| command: `npm run start -- --host 127.0.0.1 --port ${frontendPort}`, | |
| url: frontendUrl, | |
| reuseExistingServer: true, | |
| timeout: 120_000, | |
| }, | |
| ], | |
| projects: [ | |
| { | |
| name: 'chromium', | |
| use: { ...devices['Desktop Chrome'] }, | |
| }, | |
| ], | |
| }); | |