← Dashboardplaywright.config.js39 líneas · 1111 bytes
// @ts-checkconst { defineConfig, devices } = require('@playwright/test');const PORT = 5173;const BASE_URL = process.env.E2E_BASE_URL || `http://127.0.0.1:${PORT}`;/** * Playwright E2E configuration for the web app (frontend/ workspace, React + Vite). * Tests live in ./e2e. The dev server is started automatically unless one is already running. * https://playwright.dev/docs/test-configuration */module.exports = defineConfig({  testDir: './e2e',  fullyParallel: true,  forbidOnly: !!process.env.CI,  retries: process.env.CI ? 2 : 0,  workers: process.env.CI ? 1 : undefined,  reporter: [    ['html', { open: 'never' }],    ['list'],  ],  use: {    baseURL: BASE_URL,    trace: 'on-first-retry',    screenshot: 'only-on-failure',  },  projects: [    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },    { name: 'firefox', use: { ...devices['Desktop Firefox'] } },    { name: 'webkit', use: { ...devices['Desktop Safari'] } },  ],  webServer: {    command: 'npm run dev:web',    url: BASE_URL,    reuseExistingServer: !process.env.CI,    timeout: 120_000,  },});