Files
pleno-vue/playwright.config.js
T
Jeppe Bundgaard 6a8e19b3e2 Refactor and optimize component logic and tests:
- Consolidate route search handling in `PosDepartmentMVP.vue` using `applyPosRouteSearch` for improved maintainability.
- Refactor tab visibility logic in `ElementTabsBox.vue` with reusable `isHidden` utility, removing redundant code.
- Enhance `SessionUser.vue` and `superUserObject.vue` modules with lazy bindings for improved initialization and performance.
- Update `NavigationMenuItemsAdmin.vue` to validate department IDs with `hasValidDepartmentId` and watchers for reactive booking count updates.
- Improve error handling logic in `HandleGlobalError.vue` and `loadOrderItems` for robustness against invalid inputs.
- Add and update regression tests for session and superuser initialization to ensure compliance with binding contracts.
- Refactor POS step components to streamline order-related logic and support immediate reactivity.
2026-03-19 11:25:17 +01:00

57 lines
1.2 KiB
JavaScript

import { defineConfig, devices } from "@playwright/test";
const baseURL = process.env.PLAYWRIGHT_BASE_URL || "http://127.0.0.1:4173";
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 -- --host 127.0.0.1 --port 4173",
port: 4173,
timeout: 120_000,
reuseExistingServer: !isCI
},
projects: [
{
name: "chromium-desktop",
use: {
...devices["Desktop Chrome"]
}
},
{
name: "chromium-mobile",
use: {
...devices["Pixel 7"]
}
},
{
name: "firefox-desktop",
use: {
...devices["Desktop Firefox"]
}
},
{
name: "webkit-mobile",
use: {
...devices["iPhone 13"]
}
}
]
});