- Introduced `PosDesktopOrderBookingSelectorModal.vue` to streamline booking selection for desktop POS. - Added `orderBookingDisplay.js` utility for handling booking display and reference value normalization. - Created unit test `select-vehicle-form-pos.spec.js` to validate booking selection flow and registration matching. - Implemented `run-playwright-ci-parallel.mjs` script to optimize Playwright CI with parallel testing. - Updated styles and responsiveness for enhanced booking modal UX.
81 lines
2.1 KiB
TypeScript
81 lines
2.1 KiB
TypeScript
import path from "node:path";
|
|
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;
|
|
const artifactNamespace = (process.env.PLAYWRIGHT_ARTIFACT_NAMESPACE || "").trim();
|
|
const artifactRoot = artifactNamespace
|
|
? path.join("output", "playwright", artifactNamespace)
|
|
: path.join("output", "playwright");
|
|
const htmlReportOutputFolder = path.join(artifactRoot, "report");
|
|
const configuredWorkers = Number(process.env.PLAYWRIGHT_WORKERS || 2);
|
|
const workers = Number.isFinite(configuredWorkers) && configuredWorkers > 0 ? configuredWorkers : 2;
|
|
const reporterMode = (process.env.PLAYWRIGHT_REPORTER_MODE || "").trim();
|
|
const reporter =
|
|
reporterMode === "line-html"
|
|
? [
|
|
["line"],
|
|
["html", { open: "never", outputFolder: htmlReportOutputFolder }],
|
|
]
|
|
: [
|
|
["list"],
|
|
["html", { open: "never", outputFolder: htmlReportOutputFolder }],
|
|
];
|
|
|
|
export default defineConfig({
|
|
testDir: "./tests/e2e",
|
|
testIgnore: ["**/release/**"],
|
|
timeout: 60_000,
|
|
fullyParallel: true,
|
|
forbidOnly: isCI,
|
|
retries: isCI ? 2 : 0,
|
|
workers,
|
|
...(process.env.PLAYWRIGHT_BASE_URL
|
|
? {}
|
|
: {
|
|
globalSetup: "./playwright.global-setup.mjs",
|
|
globalTeardown: "./playwright.global-teardown.mjs",
|
|
}),
|
|
reporter,
|
|
outputDir: path.join(artifactRoot, "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"]
|
|
}
|
|
}
|
|
]
|
|
});
|