Files
pleno-vue/playwright.config.ts
T
Jeppe Bundgaard 60742bf947 Refactor and migrate Playwright E2E tests:
- Remove `playwright.config.js` to clean up configuration.
- Add new E2E test suites (`admin-pos-orders`, `admin-module-goals`, `admin-module-pos-mobile-order-flow`) to structure Admin module tests.
- Introduce reusable authentication and data seeding utilities in `fixtures` for streamlined test flows and maintainability.
2026-03-19 12:46:47 +01:00

63 lines
1.2 KiB
TypeScript

import { defineConfig, devices } from "@playwright/test";
const baseURL = process.env.PLAYWRIGHT_BASE_URL || "http://localhost:5173";
const isCI = !!process.env.CI;
export default defineConfig({
testDir: "./tests/e2e",
timeout: 60_000,
fullyParallel: true,
forbidOnly: isCI,
retries: isCI ? 2 : 0,
workers: isCI ? 2 : 4,
reporter: [
["list"],
["html", { open: "never", outputFolder: "output/playwright/report" }]
],
outputDir: "output/playwright/test-results",
use: {
baseURL,
trace: "retain-on-failure",
screenshot: "only-on-failure",
video: "retain-on-failure"
},
webServer: {
command: "npm run dev",
port: 5173,
timeout: 120_000,
reuseExistingServer: !isCI
},
projects: [
{
name: "chromium-desktop",
use: {
...devices["Desktop Chrome"]
}
},
{
name: "chromium-mobile",
use: {
...devices["Pixel 5"]
}
},
{
name: "firefox-desktop",
use: {
...devices["Desktop Firefox"]
}
},
{
name: "webkit-desktop",
use: {
...devices["Desktop Safari"]
}
},
{
name: "webkit-mobile",
use: {
...devices["iPhone 12"]
}
}
]
});