feat(09-03): configure Playwright for E2E testing
- Set testDir to './tests/e2e' for E2E tests - Configure single worker for database safety - Add desktop and mobile viewports (Desktop Chrome, Pixel 5) - Enable screenshots on failure, disable video - Add webServer to auto-build and preview app - Create separate docker config for deployment tests
This commit is contained in:
25
playwright.docker.config.ts
Normal file
25
playwright.docker.config.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
/**
|
||||
* Playwright config for Docker deployment tests
|
||||
* These tests run against the Docker container, not the dev server
|
||||
*/
|
||||
export default defineConfig({
|
||||
testDir: './tests',
|
||||
testMatch: 'docker-deployment.spec.ts',
|
||||
fullyParallel: true,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
reporter: 'html',
|
||||
use: {
|
||||
baseURL: process.env.BASE_URL || 'http://localhost:3000',
|
||||
trace: 'on-first-retry'
|
||||
},
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: { ...devices['Desktop Chrome'] }
|
||||
}
|
||||
]
|
||||
});
|
||||
Reference in New Issue
Block a user