mirror of
https://github.com/johndoe6345789/docker-swarm-termina.git
synced 2026-04-24 13:45:01 +00:00
- 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
31 lines
762 B
TypeScript
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,
|
|
},
|
|
});
|