-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
31 lines (30 loc) · 1.08 KB
/
Copy pathplaywright.config.ts
File metadata and controls
31 lines (30 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './e2e',
timeout: 60_000,
// Há uma única spec que sobe a SPA e executa fluxos pesados em duas viewports. Navegadores
// simultâneos saturavam o runner Windows e faziam até o carregamento inicial expirar.
// Serializar a matriz mantém o gate determinístico no mesmo perfil do self-hosted da CI.
fullyParallel: false,
workers: 1,
forbidOnly: Boolean(process.env.CI),
retries: process.env.CI ? 1 : 0,
reporter: process.env.CI ? [['html', { open: 'never' }], ['github']] : 'list',
expect: { timeout: 15_000 },
use: {
baseURL: 'http://127.0.0.1:3000',
screenshot: 'only-on-failure',
trace: 'retain-on-failure',
video: 'retain-on-failure',
},
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
{ name: 'mobile-chromium', use: { ...devices['Pixel 7'] } },
],
webServer: {
command: 'npm run dev:front -- --host 127.0.0.1',
url: 'http://127.0.0.1:3000',
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
});