- 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.
25 lines
718 B
TypeScript
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"] } }],
|
|
});
|