forked from baron/baron-sso
test(devfront): update unit tests to match refined RBAC model for privileged roles
This commit is contained in:
@@ -65,14 +65,17 @@ describe("ForbiddenMessage", () => {
|
||||
expect(clients.textContent).toContain("target application");
|
||||
});
|
||||
|
||||
it("renders standard user guidance for legacy admin roles", async () => {
|
||||
// legacy roles are now normalized to 'user' and show user guidance
|
||||
it("renders specific guidance for privileged admin roles", async () => {
|
||||
authState.user.profile.role = "rp_admin";
|
||||
const rpAdmin = await renderMessage("clients");
|
||||
expect(rpAdmin.textContent).toContain("Standard user accounts");
|
||||
expect(rpAdmin.textContent).toContain(
|
||||
"RP administrators can only access resources for their assigned applications.",
|
||||
);
|
||||
|
||||
authState.user.profile.role = "tenant_admin";
|
||||
const tenantAdmin = await renderMessage("clients");
|
||||
expect(tenantAdmin.textContent).toContain("Standard user accounts");
|
||||
expect(tenantAdmin.textContent).toContain(
|
||||
"Tenant administrator permissions are not configured correctly or have expired.",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user