1
0
forked from baron/baron-sso

액션 러너 캐시 정리

This commit is contained in:
2026-05-13 14:04:59 +09:00
parent 6ed9b2b734
commit 629716f226
5 changed files with 44 additions and 29 deletions

View File

@@ -9,31 +9,39 @@ test.describe("DevFront login", () => {
configurable: true,
value: false,
});
Object.defineProperty(window.crypto, "subtle", {
configurable: true,
value: undefined,
});
});
let authorizeRequested = false;
await page.route("**/oidc/.well-known/openid-configuration", async (route) => {
await route.fulfill({
json: {
issuer: "http://localhost:5000/oidc",
authorization_endpoint: "http://localhost:5000/oidc/oauth2/auth",
token_endpoint: "http://localhost:5000/oidc/oauth2/token",
jwks_uri: "http://localhost:5000/oidc/.well-known/jwks.json",
},
headers: { "Access-Control-Allow-Origin": "*" },
});
});
await page.route(
"**/oidc/.well-known/openid-configuration",
async (route) => {
await route.fulfill({
json: {
issuer: "http://localhost:5000/oidc",
authorization_endpoint: "http://localhost:5000/oidc/oauth2/auth",
token_endpoint: "http://localhost:5000/oidc/oauth2/token",
jwks_uri: "http://localhost:5000/oidc/.well-known/jwks.json",
},
headers: { "Access-Control-Allow-Origin": "*" },
});
},
);
await page.route("**/oidc/oauth2/auth**", async (route) => {
authorizeRequested = true;
await route.fulfill({ status: 500, body: "unexpected authorize request" });
await route.fulfill({
status: 500,
body: "unexpected authorize request",
});
});
await page.goto("/login");
await page.getByRole("button", { name: "SSO 계정으로 로그인" }).click();
await expect(page.getByRole("alert")).toContainText(
"HTTPS 또는 localhost",
);
await expect(page.getByRole("alert")).toContainText("HTTPS 또는 localhost");
expect(authorizeRequested).toBe(false);
});
});