test: add E2E tests covering full user journeys
- Create tests/e2e/full-flow.spec.ts with 5 E2E scenarios - Test home page navigation and layout - Test game creation via form - Test metadata search functionality - Test ROM-to-game linking workflow - Test complete user journey: create → search → link → view - Configure Playwright for multi-browser testing (chromium, firefox, webkit) - Optimize playwright.config.ts for E2E stability - Total: 15 tests (5 scenarios × 3 browsers)
This commit is contained in:
@@ -2,21 +2,27 @@ import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
export default defineConfig({
|
||||
testDir: 'tests',
|
||||
testMatch: '**/*.spec.ts',
|
||||
timeout: 30_000,
|
||||
expect: {
|
||||
timeout: 5000,
|
||||
},
|
||||
fullyParallel: true,
|
||||
reporter: 'list',
|
||||
fullyParallel: false, // Set to false for E2E to avoid race conditions
|
||||
reporter: [['list'], ['html']],
|
||||
use: {
|
||||
baseURL: 'http://localhost:5173', // Frontend URL
|
||||
headless: true,
|
||||
viewport: { width: 1280, height: 720 },
|
||||
actionTimeout: 0,
|
||||
actionTimeout: 10_000,
|
||||
ignoreHTTPSErrors: true,
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
projects: [
|
||||
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
|
||||
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
|
||||
{ name: 'webkit', use: { ...devices['Desktop Safari'] } },
|
||||
],
|
||||
|
||||
// Global timeout
|
||||
globalTimeout: 60 * 60 * 1000, // 1 hour
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user