Some checks failed
CI / lint-typecheck (pull_request) Failing after 13s
CI / tests (pull_request) Has been skipped
CI / contract-tests (pull_request) Has been skipped
CI / e2e-tests (pull_request) Has been skipped
CI / comment-pr (pull_request) Has been skipped
CI / commit-types (pull_request) Has been skipped
67 lines
1.7 KiB
TypeScript
67 lines
1.7 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
/**
|
|
* Playwright configuration for fully containerized e2e testing
|
|
*
|
|
* Purpose: Verify all website pages load without runtime errors
|
|
* Scope: Page rendering, console errors, React hydration, API integration
|
|
*
|
|
* Critical Detection:
|
|
* - Console errors during page load
|
|
* - React hydration mismatches
|
|
* - Navigation failures
|
|
* - Missing content
|
|
* - API connectivity issues
|
|
*
|
|
* Architecture: Everything runs in Docker
|
|
* - Website: containerized Next.js (port 3100)
|
|
* - API: containerized NestJS (port 3101)
|
|
* - Database: containerized PostgreSQL (port 5434)
|
|
* - Playwright: containerized test runner
|
|
*/
|
|
|
|
export default defineConfig({
|
|
testDir: './tests',
|
|
testMatch: process.env.RUN_EXHAUSTIVE_E2E === '1'
|
|
? ['**/e2e/**/*.spec.ts', '**/nightly/website/*.e2e.test.ts']
|
|
: ['**/e2e/**/*.spec.ts'],
|
|
testIgnore: ['**/electron-build.smoke.test.ts'],
|
|
|
|
// Serial execution for consistent results
|
|
fullyParallel: false,
|
|
workers: 1,
|
|
|
|
// Continue on errors to see all failures
|
|
maxFailures: undefined,
|
|
|
|
// Timeout: Pages should load quickly
|
|
timeout: 30_000,
|
|
|
|
// Base URL for the website (containerized)
|
|
use: {
|
|
baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://localhost:3100/',
|
|
screenshot: 'off',
|
|
video: 'off',
|
|
trace: 'off',
|
|
},
|
|
|
|
// Reporter: verbose for debugging
|
|
reporter: [
|
|
['list'],
|
|
['html', { open: 'never' }]
|
|
],
|
|
|
|
// No retry - e2e tests must pass on first run
|
|
retries: 0,
|
|
|
|
// No webServer - everything runs in Docker
|
|
webServer: undefined,
|
|
|
|
// Browser projects
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
}); |