forked from baron/baron-sso
offline_access 제거 확인 추가 및 scope 선택 개선
This commit is contained in:
@@ -315,6 +315,42 @@ describe("ClientGeneralPage RP claims", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("shows supported scopes and custom claims without integrated offline_access from the add scope button", async () => {
|
||||
const { container } = await renderPage();
|
||||
|
||||
const addScopeButton = Array.from(
|
||||
container.querySelectorAll("button"),
|
||||
).find((button) => button.textContent?.includes("Scope 추가"));
|
||||
expect(addScopeButton).toBeDefined();
|
||||
|
||||
await act(async () => {
|
||||
addScopeButton?.dispatchEvent(new MouseEvent("click", { bubbles: true }));
|
||||
});
|
||||
await flush();
|
||||
|
||||
expect(container.textContent).not.toContain("offline_access");
|
||||
expect(container.textContent).toContain("old_claim");
|
||||
|
||||
const customClaimButton = Array.from(
|
||||
container.querySelectorAll("button"),
|
||||
).find((button) => button.textContent?.includes("old_claim"));
|
||||
expect(customClaimButton).toBeDefined();
|
||||
|
||||
await act(async () => {
|
||||
customClaimButton?.dispatchEvent(
|
||||
new MouseEvent("click", { bubbles: true }),
|
||||
);
|
||||
});
|
||||
await flush();
|
||||
|
||||
const scopeInputs = Array.from(
|
||||
container.querySelectorAll<HTMLInputElement>(
|
||||
'input[placeholder="e.g. profile"]',
|
||||
),
|
||||
);
|
||||
expect(scopeInputs.some((input) => input.value === "old_claim")).toBe(true);
|
||||
});
|
||||
|
||||
it("blocks saving a number RP claim default value that is not numeric", async () => {
|
||||
const { container } = await renderPage();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user