diff --git a/adminfront/tests/users.spec.ts b/adminfront/tests/users.spec.ts index 6f851fdf..6633cd5c 100644 --- a/adminfront/tests/users.spec.ts +++ b/adminfront/tests/users.spec.ts @@ -68,7 +68,16 @@ test.describe("User Management", () => { id: "t-1", slug: "test-tenant", name: "Test Tenant", - config: { userSchema: [{key: "loginId", label: "Login ID", type: "text", isLoginId: true}] }, + config: { + userSchema: [ + { + key: "loginId", + label: "Login ID", + type: "text", + isLoginId: true, + }, + ], + }, }, ], total: 1, @@ -84,7 +93,16 @@ test.describe("User Management", () => { id: "t-1", slug: "test-tenant", name: "Test Tenant", - config: { userSchema: [{key: "loginId", label: "Login ID", type: "text", isLoginId: true}] }, + config: { + userSchema: [ + { + key: "loginId", + label: "Login ID", + type: "text", + isLoginId: true, + }, + ], + }, }, }); } @@ -149,9 +167,9 @@ test.describe("User Management", () => { if (url.match(/\/admin\/users\/u-1$/) && method === "PUT") { const postData = route.request().postData(); console.log("PUT /admin/users/u-1 payload:", postData); - + // Force 409 error for this specific conflict string - if (postData && postData.includes("johndoe_conflict")) { + if (postData?.includes("johndoe_conflict")) { return route.fulfill({ status: 409, json: { @@ -204,7 +222,9 @@ test.describe("User Management", () => { .click(); // Wait for the form to load with the existing login ID - const loginIdInput = page.locator('input[name*="metadata"][name*="loginId"]'); + const loginIdInput = page.locator( + 'input[name*="metadata"][name*="loginId"]', + ); await expect(loginIdInput).toBeVisible(); await expect(loginIdInput).toHaveValue("johndoe"); @@ -240,7 +260,9 @@ test.describe("User Management", () => { .getByRole("tab", { name: /테넌트 프로필|Tenants|Tenant Profile/i }) .click(); - const loginIdInput = page.locator('input[name*="metadata"][name*="loginId"]'); + const loginIdInput = page.locator( + 'input[name*="metadata"][name*="loginId"]', + ); await expect(loginIdInput).toBeVisible(); await expect(loginIdInput).toHaveValue("johndoe"); @@ -252,7 +274,7 @@ test.describe("User Management", () => { // Check for the specific error await expect( - page.getByText(/이미 존재하는 로그인 ID 입니다/i).first() + page.getByText(/이미 존재하는 로그인 ID 입니다/i).first(), ).toBeVisible(); });