Presupuestador_web/playwright.config.ts

18 lines
850 B
TypeScript

import { defineConfig } from "@playwright/test";
const clientPort = process.env.E2E_CLIENT_PORT ?? "4173";
export default defineConfig({
testDir: "./e2e",
timeout: 30_000,
fullyParallel: false,
retries: process.env.CI ? 2 : 0,
use: { baseURL: `http://127.0.0.1:${clientPort}`, storageState: "test-results/.auth.json", trace: "on-first-retry", screenshot: "only-on-failure", video: "off" },
projects: [{ name: "chromium", use: { browserName: "chromium" } }],
globalSetup: "./e2e/fixtures/auth.ts",
webServer: [
{ command: "node e2e/scripts/start-server.mjs", url: `http://127.0.0.1:${process.env.E2E_API_PORT ?? "4101"}/api/v1/hello`, reuseExistingServer: false, timeout: 60_000 },
{ command: "node e2e/scripts/start-client.mjs", url: `http://127.0.0.1:${clientPort}`, reuseExistingServer: false, timeout: 60_000 },
],
});