Files
docker-swarm-termina/frontend/playwright.config.ts
Claude cd16fbc6bb Add tests with coverage and e2e to Docker build process
- Update backend Dockerfile with multi-stage build that runs pytest
  with coverage (70% threshold) before production build
- Update frontend Dockerfile with multi-stage build including:
  - Unit test stage with Jest coverage
  - E2E test stage with Playwright
  - Production stage depends on test stages via markers
- Add Playwright e2e tests for login, dashboard, and terminal flows
- Configure Playwright with chromium browser
- Update jest.config.js to exclude e2e directory
- Update docker-compose.yml to target production stage

https://claude.ai/code/session_01XSQJybTpvKyN7td4Y8n5Rm
2026-02-01 17:10:32 +00:00

31 lines
762 B
TypeScript

import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: [
['html', { outputFolder: 'playwright-report' }],
['list'],
],
use: {
baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://localhost:3000',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: process.env.CI ? undefined : {
command: 'npm run dev',
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
timeout: 120 * 1000,
},
});