-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
34 lines (26 loc) · 900 Bytes
/
Copy pathplaywright.config.ts
File metadata and controls
34 lines (26 loc) · 900 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 } from "@playwright/test";
export default defineConfig({
// Carpeta donde están los tests
testDir: "./tests/e2e",
// Timeout por test
timeout: 30_000,
// Reintentos en CI (no localmente)
retries: process.env.CI ? 2 : 0,
// Correr tests en paralelo
workers: process.env.CI ? 1 : undefined,
// Reporte HTML — se sube como artefacto en el pipeline
reporter: [
["html", { outputFolder: "playwright-report", open: "never" }],
["list"], // También muestra en consola
],
use: {
// La URL base viene de la variable de entorno (o localhost por defecto)
baseURL: process.env.BASE_URL || "http://localhost:8000",
// Guarda trace en caso de fallo (muy útil para debuggear en CI)
trace: "on-first-retry",
// Headers por defecto para todos los requests
extraHTTPHeaders: {
Accept: "application/json",
},
},
});