1
0
forked from baron/baron-sso

fix: update devfront tests to match simplified RBAC model

- Updated role normalization tests to expect legacy roles mapped to 'user'.
- Updated forbidden message tests to expect standard user guidance for legacy roles.
This commit is contained in:
2026-06-02 19:27:59 +09:00
parent e5f1c85e29
commit b7c963b672
2 changed files with 11 additions and 10 deletions

View File

@@ -58,20 +58,21 @@ describe("ForbiddenMessage", () => {
const consents = await renderMessage("consents");
expect(consents.textContent).toContain("User Consent Grants");
expect(consents.textContent).toContain("consent read");
expect(consents.textContent).toContain("operational relationship");
const clients = await renderMessage("clients");
expect(clients.textContent).toContain("Connected Applications");
expect(clients.textContent).toContain("target RP");
expect(clients.textContent).toContain("target application");
});
it("renders role-specific administrator guidance", async () => {
it("renders standard user guidance for legacy admin roles", async () => {
// legacy roles are now normalized to 'user' and show user guidance
authState.user.profile.role = "rp_admin";
const rpAdmin = await renderMessage("clients");
expect(rpAdmin.textContent).toContain("RP administrators");
expect(rpAdmin.textContent).toContain("Standard user accounts");
authState.user.profile.role = "tenant_admin";
const tenantAdmin = await renderMessage("clients");
expect(tenantAdmin.textContent).toContain("tenant administrator");
expect(tenantAdmin.textContent).toContain("Standard user accounts");
});
});