- Replaced `POSOrderReference.vue` with `OrderAttachmentsActionButton.vue` and added new features like attachment preview, upload, and management. - Introduced `POSOrderCustomerWishes.vue` for handling customer wishes fields with autosave behavior. - Added Playwright global setup/teardown scripts for managing dev server lifecycle during tests. - Enhanced booking flow test utilities and adjusted visibility rules in `bookingFlow.ts`.
64 lines
1.3 KiB
TypeScript
64 lines
1.3 KiB
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
const devPort = Number(process.env.PLAYWRIGHT_DEV_PORT || 5173);
|
|
const baseURL = process.env.PLAYWRIGHT_BASE_URL || `http://localhost:${devPort}`;
|
|
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,
|
|
...(process.env.PLAYWRIGHT_BASE_URL
|
|
? {}
|
|
: {
|
|
globalSetup: "./playwright.global-setup.mjs",
|
|
globalTeardown: "./playwright.global-teardown.mjs",
|
|
}),
|
|
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"
|
|
},
|
|
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"]
|
|
}
|
|
}
|
|
]
|
|
});
|