feat(web): add teams page and RBAC navigation/route gating (MS21-UI-005, RBAC-001, RBAC-002)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful

This commit is contained in:
2026-02-28 22:27:34 -06:00
parent e04b46a6b6
commit 45eaaa7010
8 changed files with 748 additions and 213 deletions

View File

@@ -118,6 +118,23 @@ describe("UsersSettingsPage", () => {
});
});
it("shows access denied to non-admin users", async () => {
fetchUserWorkspacesMock.mockResolvedValueOnce([
{
id: "workspace-1",
name: "Personal Workspace",
ownerId: "owner-1",
role: WorkspaceMemberRole.MEMBER,
createdAt: "2026-01-01T00:00:00.000Z",
},
]);
render(<UsersSettingsPage />);
expect(await screen.findByText("Access Denied")).toBeInTheDocument();
expect(fetchAdminUsersMock).not.toHaveBeenCalled();
});
it("invites a user with email and role from the dialog", async () => {
const user = userEvent.setup();
render(<UsersSettingsPage />);