1
0
forked from baron/baron-sso

offline_access 제거 확인 추가 및 scope 선택 개선

This commit is contained in:
2026-06-11 15:02:52 +09:00
parent c495e9119b
commit 22afe6654e
3 changed files with 303 additions and 5 deletions

View File

@@ -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();