diff --git a/adminfront/src/features/users/UserDetailPage.tsx b/adminfront/src/features/users/UserDetailPage.tsx index b3d23eb1..1202c215 100644 --- a/adminfront/src/features/users/UserDetailPage.tsx +++ b/adminfront/src/features/users/UserDetailPage.tsx @@ -661,15 +661,15 @@ function UserDetailPage() { string, Record >) || {}), - sub_email: (Array.isArray(user.metadata?.sub_email) + sub_email: Array.isArray(user.metadata?.sub_email) ? user.metadata.sub_email : typeof user.metadata?.sub_email === "string" ? user.metadata.sub_email .split(/[;,\n\r\t]/) .map((e) => e.trim()) .filter((e) => e.includes("@")) - : []) as unknown[], - }, + : [], + } as any, }); const isUserHanmacFamily = isHanmacFamilyUser( user, diff --git a/adminfront/tests/audit.spec.ts b/adminfront/tests/audit.spec.ts index 798536bf..474ab294 100644 --- a/adminfront/tests/audit.spec.ts +++ b/adminfront/tests/audit.spec.ts @@ -59,7 +59,7 @@ test.describe("Audit Logs Management", () => { }; test("should load initial logs and display correctly", async ({ page }) => { - await page.route("**/api/v1/audit?limit=50*", async (route) => { + await page.route("**/api/v1/audit*", async (route) => { return route.fulfill({ json: { items: generateMockLogs(20, 0), total: 20 }, headers: { "Access-Control-Allow-Origin": "*" }, @@ -83,7 +83,7 @@ test.describe("Audit Logs Management", () => { page, }) => { let callCount = 0; - await page.route("**/api/v1/audit?limit=50*", async (route) => { + await page.route("**/api/v1/audit*", async (route) => { const logs = generateMockLogs(20, callCount * 20); callCount++; return route.fulfill({ @@ -108,7 +108,7 @@ test.describe("Audit Logs Management", () => { }); test("should filter logs by Action and User ID locally", async ({ page }) => { - await page.route("**/api/v1/audit?limit=50*", async (route) => { + await page.route("**/api/v1/audit*", async (route) => { return route.fulfill({ json: { items: generateMockLogs(20, 0), total: 20 }, headers: { "Access-Control-Allow-Origin": "*" }, @@ -146,7 +146,7 @@ test.describe("Audit Logs Management", () => { }); test("should filter logs by Status locally", async ({ page }) => { - await page.route("**/api/v1/audit?limit=50*", async (route) => { + await page.route("**/api/v1/audit*", async (route) => { return route.fulfill({ json: { items: generateMockLogs(20, 0), total: 20 }, headers: { "Access-Control-Allow-Origin": "*" }, diff --git a/adminfront/tests/users.spec.ts b/adminfront/tests/users.spec.ts index 981d661b..3dd56888 100644 --- a/adminfront/tests/users.spec.ts +++ b/adminfront/tests/users.spec.ts @@ -721,7 +721,7 @@ test.describe("User Management", () => { await expect(page.locator("input#department")).toHaveCount(0); await expect(page.getByText(/대표 소속/i)).toHaveCount(0); - await page.getByRole("button", { name: /^추가$/i }).click(); + await page.getByRole("tabpanel").getByRole("button", { name: /^추가$/i }).click(); await expect(page.getByTestId("appointment-row-0")).toBeVisible(); await expect( page.getByTestId("appointment-tenant-owner-line-0"),