1
0
forked from baron/baron-sso

test(devfront): update unit tests to match refined RBAC model for privileged roles

This commit is contained in:
2026-06-04 10:14:07 +09:00
parent 322fd13d67
commit a125b1d7ae
2 changed files with 9 additions and 6 deletions

View File

@@ -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.",
);
});
});