-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
34 lines (32 loc) · 823 Bytes
/
Copy pathplaywright.config.ts
File metadata and controls
34 lines (32 loc) · 823 Bytes
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
32
33
34
import { defineConfig, devices } from '@playwright/test'
const BASE_URL = process.env.BASE_URL || 'http://localhost:4173'
const isRemote = !!process.env.BASE_URL
export default defineConfig({
testDir: './tests/e2e',
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 1,
workers: 1,
reporter: 'line',
timeout: 90000,
use: {
baseURL: BASE_URL,
trace: 'on-first-retry',
actionTimeout: 15000,
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
// Sugestão Sênior: Rodar contra o Preview (Produção Local) para estabilidade
...(isRemote ? {} : {
webServer: {
command: 'npm run build && npm run preview',
port: 4173,
reuseExistingServer: false,
timeout: 120000,
},
}),
})