docs: standardize AgendaMax demo access
This commit is contained in:
+4
-4
@@ -24,13 +24,13 @@ console.log("\n=== HEALTH & AUTH ===");
|
||||
const h = await req("/api/health"); check("health", h.json?.ok === true);
|
||||
const me = await req("/api/auth/demo-users"); check("demo-users >= 8", me.json.users.length >= 8);
|
||||
|
||||
const owner = await login("owner@agendapro.demo"); check("owner login", !!owner.token && owner.user.role === "owner");
|
||||
const owner = await login("owner@agendamax.demo"); check("owner login", !!owner.token && owner.user.role === "owner");
|
||||
const empLogin = await login("[email protected]"); check("employee login", empLogin.user.role === "employee" && empLogin.user.employee_id);
|
||||
const adminLogin = await login("admin@agendapro.demo"); check("admin login", adminLogin.user.role === "admin");
|
||||
const adminLogin = await login("admin@agendamax.demo"); check("admin login", adminLogin.user.role === "admin");
|
||||
const t = owner.token, eT = empLogin.token, aT = adminLogin.token;
|
||||
|
||||
// /me fix
|
||||
const meR = await req("/api/auth/me", { headers: H(t) }); check("/me returns owner", meR.json.user.email === "owner@agendapro.demo");
|
||||
const meR = await req("/api/auth/me", { headers: H(t) }); check("/me returns owner", meR.json.user.email === "owner@agendamax.demo");
|
||||
|
||||
console.log("\n=== EXISTING: business / employees / services / clients / appointments / dashboard ===");
|
||||
const biz = await req("/api/business", { headers: H(t) }); check("business loaded", biz.json.business?.name === "Lumière Estética & Spa");
|
||||
@@ -211,4 +211,4 @@ if (fail) {
|
||||
failures.forEach((f) => console.log(" •", f));
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(0);
|
||||
process.exit(0);
|
||||
|
||||
Reference in New Issue
Block a user