27 lines
850 B
TypeScript
27 lines
850 B
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './test/e2e',
|
|
outputDir: './test/results',
|
|
timeout: 30_000,
|
|
expect: { timeout: 5_000 },
|
|
fullyParallel: true,
|
|
retries: process.env.CI ? 1 : 0,
|
|
reporter: [['list'], ['html', { outputFolder: 'test/report', open: 'never' }]],
|
|
use: {
|
|
baseURL: 'http://localhost:5174',
|
|
// Playwright/Chromium domyślnie en-US — wymuszamy PL, bo detekcja i18n
|
|
// ustawiłaby EN i wszystkie selektory PL w e2e przestałyby pasować.
|
|
locale: 'pl-PL',
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
},
|
|
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
|
|
webServer: {
|
|
command: 'npm run dev',
|
|
url: 'http://localhost:5174',
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 60_000,
|
|
},
|
|
});
|