forked from baron/baron-sso
super admin RP 관계 관리 버튼 활성화
This commit is contained in:
@@ -96,4 +96,49 @@ test.describe("DevFront relationships", () => {
|
||||
)
|
||||
.toBe(1);
|
||||
});
|
||||
|
||||
test("super_admin can add RP relationships even when profile role is missing", async ({
|
||||
page,
|
||||
}) => {
|
||||
await seedAuth(page);
|
||||
await page.evaluate(() => {
|
||||
window.localStorage.setItem("dev_role", "super_admin");
|
||||
});
|
||||
|
||||
const state = {
|
||||
clients: [makeClient("client-rel", { name: "Relations app" })],
|
||||
consents: [] as Consent[],
|
||||
users: [
|
||||
{
|
||||
id: "user-2",
|
||||
name: "홍길동",
|
||||
email: "hong@example.com",
|
||||
loginId: "hong01",
|
||||
},
|
||||
],
|
||||
relations: {
|
||||
"client-rel": [
|
||||
{
|
||||
relation: "admins",
|
||||
subject: "User:playwright-user",
|
||||
subjectType: "User",
|
||||
subjectId: "playwright-user",
|
||||
userName: "Playwright User",
|
||||
userEmail: "playwright@example.com",
|
||||
},
|
||||
] satisfies ClientRelation[],
|
||||
},
|
||||
auditLogsByCursor: undefined,
|
||||
};
|
||||
await installDevApiMock(page, state);
|
||||
|
||||
await page.goto("/clients/client-rel/relationships");
|
||||
await expect(page.getByText("클라이언트 관계")).toBeVisible();
|
||||
|
||||
await page.getByLabel(/^사용자$/).fill("홍길동");
|
||||
await page.getByRole("button", { name: /홍길동/ }).click();
|
||||
await page.getByLabel(/시크릿 재발급/).check();
|
||||
|
||||
await expect(page.getByRole("button", { name: /^추가$/ })).toBeEnabled();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user