45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
|
|
import { defineConfig, devices } from '@playwright/test';
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
testDir: '.',
|
||
|
|
testMatch: [
|
||
|
|
'functional/**/*.spec.ts',
|
||
|
|
'pixel-perfect/**/*.spec.ts',
|
||
|
|
'interaction/**/*.spec.ts',
|
||
|
|
'accessibility/**/*.spec.ts',
|
||
|
|
'ethical/**/*.spec.ts',
|
||
|
|
'screenshots/**/*.spec.ts',
|
||
|
|
],
|
||
|
|
outputDir: './results/test-results',
|
||
|
|
fullyParallel: false,
|
||
|
|
workers: 1, // Fiabilité absolue — pas de race conditions
|
||
|
|
retries: 0, // Chaque échec est un vrai problème
|
||
|
|
timeout: 60_000, // Tests visuels et interactions prennent du temps
|
||
|
|
expect: {
|
||
|
|
timeout: 10_000,
|
||
|
|
},
|
||
|
|
reporter: [
|
||
|
|
['html', { outputFolder: './results/html-report', open: 'never' }],
|
||
|
|
['json', { outputFile: './results/results.json' }],
|
||
|
|
['list'],
|
||
|
|
],
|
||
|
|
use: {
|
||
|
|
baseURL: process.env.PLAYWRIGHT_BASE_URL || `http://localhost:${process.env.PORT || '5173'}`,
|
||
|
|
screenshot: 'on', // Screenshot de CHAQUE test (pas que les échecs)
|
||
|
|
trace: 'retain-on-failure',
|
||
|
|
video: 'retain-on-failure',
|
||
|
|
actionTimeout: 10_000,
|
||
|
|
navigationTimeout: 30_000,
|
||
|
|
locale: 'fr-FR',
|
||
|
|
},
|
||
|
|
projects: [
|
||
|
|
{
|
||
|
|
name: 'chromium-audit',
|
||
|
|
use: {
|
||
|
|
...devices['Desktop Chrome'],
|
||
|
|
viewport: { width: 1440, height: 900 },
|
||
|
|
},
|
||
|
|
},
|
||
|
|
],
|
||
|
|
});
|