FactuGES_ERP/playwright.external.config.ts
David da362fef64 feat(e2e): implement end-to-end testing framework with database preparation and lifecycle management
- Add E2ESchemaDatabaseConfig interface for database configuration validation.
- Implement assertE2ESchemaDatabaseConfig function to enforce schema requirements.
- Create prepareE2ESchema function to handle schema preparation and initialization.
- Develop E2E lifecycle management functions to provision, prepare, and run tests.
- Introduce Docker Compose setup for E2E database environment.
- Add Playwright configuration for E2E testing.
- Implement various test cases to validate E2E schema preparation and lifecycle.
- Create utility functions for environment variable management and database assertions.
- Establish smoke tests to verify initial data setup and integrity.
2026-09-22 16:49:08 +02:00

25 lines
718 B
TypeScript

import { defineConfig, devices } from "@playwright/test";
import { resolveE2EExecutionMode } from "./tests/e2e/support/e2e-contract";
resolveE2EExecutionMode(process.env);
export default defineConfig({
testDir: "./tests/e2e",
testIgnore: "**/e2e-contract.test.ts",
timeout: 30_000,
expect: { timeout: 5_000 },
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
reporter: [["html", { open: "never" }]],
use: {
baseURL: process.env.E2E_BASE_URL,
testIdAttribute: "data-testid",
trace: "on-first-retry",
screenshot: "only-on-failure",
video: "retain-on-failure",
},
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
});