Refactor POS components and implement new features:

- 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`.
This commit is contained in:
Jeppe Bundgaard
2026-04-13 15:27:34 +02:00
parent 8a25dcd97d
commit 653aa63899
29 changed files with 1465 additions and 425 deletions
+44
View File
@@ -0,0 +1,44 @@
import fs from "node:fs/promises";
import path from "node:path";
import { execFile } from "node:child_process";
import { promisify } from "node:util";
const execFileAsync = promisify(execFile);
const pidFile = path.resolve(process.cwd(), "output/playwright/dev-server.json");
async function killProcessTree(pid) {
if (!pid) {
return;
}
if (process.platform === "win32") {
await execFileAsync("taskkill", ["/PID", String(pid), "/T", "/F"], { cwd: process.cwd() }).catch(() => {});
return;
}
try {
process.kill(-pid, "SIGTERM");
} catch {
try {
process.kill(pid, "SIGTERM");
} catch {
// ignore
}
}
}
export default async function globalTeardown() {
if (process.env.PLAYWRIGHT_BASE_URL) {
return;
}
try {
const file = await fs.readFile(pidFile, "utf8");
const { pid } = JSON.parse(file);
await killProcessTree(pid);
} catch {
// ignore missing or malformed state
}
await fs.rm(pidFile, { force: true }).catch(() => {});
}