diff --git a/devfront/tests/helpers/devfront-fixtures.ts b/devfront/tests/helpers/devfront-fixtures.ts index 5b62f1c2..3f6ff964 100644 --- a/devfront/tests/helpers/devfront-fixtures.ts +++ b/devfront/tests/helpers/devfront-fixtures.ts @@ -156,14 +156,22 @@ export async function seedAuth(page: Page, role?: string) { expires_at: issuedAt + 3600, }; - window.localStorage.setItem( + const storageKeys = [ + "user:http://localhost:5000/oidc:devfront", + "user:http://localhost:5000/oidc/:devfront", + "user:https://sso-test.hmac.kr/oidc:devfront", + "user:https://sso-test.hmac.kr/oidc/:devfront", "oidc.user:http://localhost:5000/oidc:devfront", - JSON.stringify(mockOidcUser), - ); - window.localStorage.setItem( "oidc.user:http://localhost:5000/oidc/:devfront", - JSON.stringify(mockOidcUser), - ); + "oidc.user:https://sso-test.hmac.kr/oidc:devfront", + "oidc.user:https://sso-test.hmac.kr/oidc/:devfront", + ]; + + for (const key of storageKeys) { + window.localStorage.setItem(key, JSON.stringify(mockOidcUser)); + window.sessionStorage.setItem(key, JSON.stringify(mockOidcUser)); + } + window.localStorage.setItem("dev_role", injectedRole || "rp_admin"); window.localStorage.setItem("dev_tenant_id", "tenant-a"); },