Staff / Owner

Merged staff and owner settings
This commit is contained in:
Stefan Lazic committed 2026-08-05 16:35:52 +01:00
1 parent cf3a28f3cd
commit 3300045d9e
23 files changed
+693 -236

No files matched your search

+14 -1
View File
@@ -15,7 +15,20 @@ export default function globalSetup() {
);
}
const env = { ...process.env };
const env = {
...process.env,
// A Super Administrator is provisioned separately from prisma/seed.ts
// (see scripts/ensure-super-admin.ts's own doc comment — it deliberately
// stays out of the dev/demo seed) — the merged-nav E2E scenarios need
// one to sign in as, so this fixes deterministic test-only credentials
// when the caller hasn't already set their own (same fallback pattern
// as AUTH_SECRET in playwright.config.ts).
SUPER_ADMIN_EMAIL: process.env.SUPER_ADMIN_EMAIL || "superadmin@blakeheritage.co.uk",
SUPER_ADMIN_PASSWORD: process.env.SUPER_ADMIN_PASSWORD || "password123",
SUPER_ADMIN_FIRST_NAME: process.env.SUPER_ADMIN_FIRST_NAME || "Super",
SUPER_ADMIN_LAST_NAME: process.env.SUPER_ADMIN_LAST_NAME || "Admin",
};
execFileSync("npx", ["prisma", "migrate", "deploy"], { stdio: "inherit", env });
execFileSync("npx", ["tsx", "prisma/seed.ts"], { stdio: "inherit", env });
execFileSync("npx", ["tsx", "scripts/ensure-super-admin.ts"], { stdio: "inherit", env });
}