From ae03fe1475c1370bea992637eb27ba1e44f9139f Mon Sep 17 00:00:00 2001 From: chan Date: Tue, 21 Apr 2026 15:02:53 +0900 Subject: [PATCH] chore: update playwright fixtures to use real SSO domain Since the OIDC authority was updated to https://sso.hmac.kr/oidc, the Playwright mocks and localStorage seed values must match exactly for tests to pass in the new configuration. --- adminfront/tests/auth.spec.ts | 14 +++++++------- adminfront/tests/bulk_actions.spec.ts | 4 ++-- adminfront/tests/owners.spec.ts | 4 ++-- adminfront/tests/tenants.spec.ts | 4 ++-- adminfront/tests/users.spec.ts | 14 +++++++------- adminfront/tests/users_bulk.spec.ts | 4 ++-- adminfront/tests/users_schema.spec.ts | 14 +++++++------- devfront/tests/helpers/devfront-fixtures.ts | 16 ++++++++-------- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/adminfront/tests/auth.spec.ts b/adminfront/tests/auth.spec.ts index 87e5623b..b74215a5 100644 --- a/adminfront/tests/auth.spec.ts +++ b/adminfront/tests/auth.spec.ts @@ -10,7 +10,7 @@ test.describe("Authentication", () => { window as Window & typeof globalThis & { _IS_TEST_MODE?: boolean } )._IS_TEST_MODE = true; - const authority = "http://localhost:5000/oidc"; + const authority = "https://sso.hmac.kr/oidc"; const client_id = "adminfront"; const key = `oidc.user:${authority}:${client_id}`; const authData = { @@ -45,12 +45,12 @@ test.describe("Authentication", () => { if (url.includes(".well-known/openid-configuration")) { await route.fulfill({ json: { - issuer: "http://localhost:5000/oidc", - authorization_endpoint: "http://localhost:5000/oidc/auth", - token_endpoint: "http://localhost:5000/oidc/token", - jwks_uri: "http://localhost:5000/oidc/jwks", - userinfo_endpoint: "http://localhost:5000/oidc/userinfo", - end_session_endpoint: "http://localhost:5000/oidc/session/end", + issuer: "https://sso.hmac.kr/oidc", + authorization_endpoint: "https://sso.hmac.kr/oidc/auth", + token_endpoint: "https://sso.hmac.kr/oidc/token", + jwks_uri: "https://sso.hmac.kr/oidc/jwks", + userinfo_endpoint: "https://sso.hmac.kr/oidc/userinfo", + end_session_endpoint: "https://sso.hmac.kr/oidc/session/end", }, headers: { "Access-Control-Allow-Origin": "*" }, }); diff --git a/adminfront/tests/bulk_actions.spec.ts b/adminfront/tests/bulk_actions.spec.ts index 8b0b5e45..0a3bf8fc 100644 --- a/adminfront/tests/bulk_actions.spec.ts +++ b/adminfront/tests/bulk_actions.spec.ts @@ -9,7 +9,7 @@ test.describe("Bulk Actions and Tree Search", () => { window as Window & typeof globalThis & { _IS_TEST_MODE?: boolean } )._IS_TEST_MODE = true; - const authority = "http://localhost:5000/oidc"; + const authority = "https://sso.hmac.kr/oidc"; const client_id = "adminfront"; const key = `oidc.user:${authority}:${client_id}`; const authData = { @@ -114,7 +114,7 @@ test.describe("Bulk Actions and Tree Search", () => { }); await page.route("**/oidc/**", async (route) => { - await route.fulfill({ json: { issuer: "http://localhost:5000/oidc" } }); + await route.fulfill({ json: { issuer: "https://sso.hmac.kr/oidc" } }); }); }); diff --git a/adminfront/tests/owners.spec.ts b/adminfront/tests/owners.spec.ts index eea69e9c..77269f11 100644 --- a/adminfront/tests/owners.spec.ts +++ b/adminfront/tests/owners.spec.ts @@ -3,7 +3,7 @@ import { expect, test } from "@playwright/test"; test.describe("Tenant Owners Management", () => { test.beforeEach(async ({ page }) => { await page.addInitScript(() => { - const authority = "http://localhost:5000/oidc"; + const authority = "https://sso.hmac.kr/oidc"; const client_id = "adminfront"; const key = `oidc.user:${authority}:${client_id}`; const authData = { @@ -26,7 +26,7 @@ test.describe("Tenant Owners Management", () => { }); await page.route("**/oidc/**", async (route) => { - await route.fulfill({ json: { issuer: "http://localhost:5000/oidc" } }); + await route.fulfill({ json: { issuer: "https://sso.hmac.kr/oidc" } }); }); await page.route(/.*\/api\/v1\/.*/, async (route) => { diff --git a/adminfront/tests/tenants.spec.ts b/adminfront/tests/tenants.spec.ts index f2b1488e..9dc9e85a 100644 --- a/adminfront/tests/tenants.spec.ts +++ b/adminfront/tests/tenants.spec.ts @@ -9,7 +9,7 @@ test.describe("Tenants Management", () => { window as Window & typeof globalThis & { _IS_TEST_MODE?: boolean } )._IS_TEST_MODE = true; - const authority = "http://localhost:5000/oidc"; + const authority = "https://sso.hmac.kr/oidc"; const client_id = "adminfront"; const key = `oidc.user:${authority}:${client_id}`; const authData = { @@ -52,7 +52,7 @@ test.describe("Tenants Management", () => { }); await page.route("**/oidc/**", async (route) => { - await route.fulfill({ json: { issuer: "http://localhost:5000/oidc" } }); + await route.fulfill({ json: { issuer: "https://sso.hmac.kr/oidc" } }); }); }); diff --git a/adminfront/tests/users.spec.ts b/adminfront/tests/users.spec.ts index 6633cd5c..ea6fdabb 100644 --- a/adminfront/tests/users.spec.ts +++ b/adminfront/tests/users.spec.ts @@ -3,7 +3,7 @@ import { expect, test } from "@playwright/test"; test.describe("User Management", () => { test.beforeEach(async ({ page }) => { await page.addInitScript(() => { - const authority = "http://localhost:5000/oidc"; + const authority = "https://sso.hmac.kr/oidc"; const client_id = "adminfront"; const key = `oidc.user:${authority}:${client_id}`; const authData = { @@ -33,15 +33,15 @@ test.describe("User Management", () => { if (route.request().url().includes("/.well-known/openid-configuration")) { return route.fulfill({ json: { - issuer: "http://localhost:5000/oidc", - authorization_endpoint: "http://localhost:5000/oidc/auth", - token_endpoint: "http://localhost:5000/oidc/token", - userinfo_endpoint: "http://localhost:5000/oidc/userinfo", - jwks_uri: "http://localhost:5000/oidc/jwks", + issuer: "https://sso.hmac.kr/oidc", + authorization_endpoint: "https://sso.hmac.kr/oidc/auth", + token_endpoint: "https://sso.hmac.kr/oidc/token", + userinfo_endpoint: "https://sso.hmac.kr/oidc/userinfo", + jwks_uri: "https://sso.hmac.kr/oidc/jwks", }, }); } - await route.fulfill({ json: { issuer: "http://localhost:5000/oidc" } }); + await route.fulfill({ json: { issuer: "https://sso.hmac.kr/oidc" } }); }); await page.route(/.*\/api\/v1\/.*/, async (route) => { diff --git a/adminfront/tests/users_bulk.spec.ts b/adminfront/tests/users_bulk.spec.ts index c7aa3a2d..26107f5b 100644 --- a/adminfront/tests/users_bulk.spec.ts +++ b/adminfront/tests/users_bulk.spec.ts @@ -9,7 +9,7 @@ test.describe("Users Bulk Upload", () => { window as Window & typeof globalThis & { _IS_TEST_MODE?: boolean } )._IS_TEST_MODE = true; - const authority = "http://localhost:5000/oidc"; + const authority = "https://sso.hmac.kr/oidc"; const client_id = "adminfront"; const key = `oidc.user:${authority}:${client_id}`; const authData = { @@ -54,7 +54,7 @@ test.describe("Users Bulk Upload", () => { }); await page.route("**/oidc/**", async (route) => { - await route.fulfill({ json: { issuer: "http://localhost:5000/oidc" } }); + await route.fulfill({ json: { issuer: "https://sso.hmac.kr/oidc" } }); }); }); diff --git a/adminfront/tests/users_schema.spec.ts b/adminfront/tests/users_schema.spec.ts index 2f954271..41f32847 100644 --- a/adminfront/tests/users_schema.spec.ts +++ b/adminfront/tests/users_schema.spec.ts @@ -3,7 +3,7 @@ import { expect, test } from "@playwright/test"; test.describe("User Schema Dynamic Form", () => { test.beforeEach(async ({ page }) => { await page.addInitScript(() => { - const authority = "http://localhost:5000/oidc"; + const authority = "https://sso.hmac.kr/oidc"; const client_id = "adminfront"; const key = `oidc.user:${authority}:${client_id}`; const authData = { @@ -35,15 +35,15 @@ test.describe("User Schema Dynamic Form", () => { if (route.request().url().includes("/.well-known/openid-configuration")) { return route.fulfill({ json: { - issuer: "http://localhost:5000/oidc", - authorization_endpoint: "http://localhost:5000/oidc/auth", - token_endpoint: "http://localhost:5000/oidc/token", - userinfo_endpoint: "http://localhost:5000/oidc/userinfo", - jwks_uri: "http://localhost:5000/oidc/jwks", + issuer: "https://sso.hmac.kr/oidc", + authorization_endpoint: "https://sso.hmac.kr/oidc/auth", + token_endpoint: "https://sso.hmac.kr/oidc/token", + userinfo_endpoint: "https://sso.hmac.kr/oidc/userinfo", + jwks_uri: "https://sso.hmac.kr/oidc/jwks", }, }); } - await route.fulfill({ json: { issuer: "http://localhost:5000/oidc" } }); + await route.fulfill({ json: { issuer: "https://sso.hmac.kr/oidc" } }); }); await page.route(/.*\/api\/v1\/.*/, async (route) => { diff --git a/devfront/tests/helpers/devfront-fixtures.ts b/devfront/tests/helpers/devfront-fixtures.ts index e8200f9b..39fd3f36 100644 --- a/devfront/tests/helpers/devfront-fixtures.ts +++ b/devfront/tests/helpers/devfront-fixtures.ts @@ -137,11 +137,11 @@ export async function seedAuth(page: Page, role?: string) { }; window.localStorage.setItem( - "oidc.user:http://localhost:5000/oidc:devfront", + "oidc.user:https://sso.hmac.kr/oidc:devfront", JSON.stringify(mockOidcUser), ); window.localStorage.setItem( - "oidc.user:http://localhost:5000/oidc/:devfront", + "oidc.user:https://sso.hmac.kr/oidc/:devfront", JSON.stringify(mockOidcUser), ); window.localStorage.setItem("dev_role", injectedRole || "rp_admin"); @@ -155,12 +155,12 @@ export async function seedAuth(page: Page, role?: string) { if (url.includes(".well-known/openid-configuration")) { await route.fulfill({ json: { - issuer: "http://localhost:5000/oidc", - authorization_endpoint: "http://localhost:5000/oidc/auth", - token_endpoint: "http://localhost:5000/oidc/token", - jwks_uri: "http://localhost:5000/oidc/jwks", - userinfo_endpoint: "http://localhost:5000/oidc/userinfo", - end_session_endpoint: "http://localhost:5000/oidc/session/end", + issuer: "https://sso.hmac.kr/oidc", + authorization_endpoint: "https://sso.hmac.kr/oidc/auth", + token_endpoint: "https://sso.hmac.kr/oidc/token", + jwks_uri: "https://sso.hmac.kr/oidc/jwks", + userinfo_endpoint: "https://sso.hmac.kr/oidc/userinfo", + end_session_endpoint: "https://sso.hmac.kr/oidc/session/end", }, headers: { "Access-Control-Allow-Origin": "*" }, });