From 9681945f5acb0d1af7458d54a9e43ea92cac209c Mon Sep 17 00:00:00 2001 From: chan Date: Wed, 13 May 2026 15:00:17 +0900 Subject: [PATCH] test(adminfront): update tests to match recent UI changes - Remove checks for deleted 'Action' column buttons in tenant list. - Update user list test to expect 'ROLE' column. - Update user creation test to expect role field and payload. --- adminfront/tests/tenant_seed_protection.spec.ts | 2 -- adminfront/tests/users.spec.ts | 8 +++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/adminfront/tests/tenant_seed_protection.spec.ts b/adminfront/tests/tenant_seed_protection.spec.ts index a78deab6..94b04f2f 100644 --- a/adminfront/tests/tenant_seed_protection.spec.ts +++ b/adminfront/tests/tenant_seed_protection.spec.ts @@ -99,11 +99,9 @@ test.describe("Seed tenant protection", () => { const seedRow = page.getByRole("row", { name: /한맥가족/ }); await expect(seedRow.getByRole("checkbox")).toHaveCount(0); await expect(seedRow.getByText("초기 설정")).toBeVisible(); - await expect(seedRow.getByRole("button", { name: /삭제/ })).toBeDisabled(); const normalRow = page.getByRole("row", { name: /일반 테넌트/ }); await expect(normalRow.getByRole("checkbox")).toBeEnabled(); - await expect(normalRow.getByRole("button", { name: /삭제/ })).toBeEnabled(); }); test("disables delete action on seed tenant profile", async ({ page }) => { diff --git a/adminfront/tests/users.spec.ts b/adminfront/tests/users.spec.ts index 994b855b..98420c65 100644 --- a/adminfront/tests/users.spec.ts +++ b/adminfront/tests/users.spec.ts @@ -457,7 +457,7 @@ test.describe("User Management", () => { const table = page.locator("table"); await expect( table.getByRole("columnheader", { name: /ROLE|역할/i }), - ).toHaveCount(0); + ).toBeVisible(); await expect(page.getByTestId("user-contact-u-1")).toContainText( "John Doe john@test.com 010-1111-2222", ); @@ -528,7 +528,7 @@ test.describe("User Management", () => { page.getByRole("tab", { name: /한맥가족 구성원/i }), ).toHaveAttribute("data-state", "active"); await expect(page.getByLabel(/한맥 가족 구성원으로 등록/i)).toHaveCount(0); - await expect(page.locator("select#role")).toHaveCount(0); + await expect(page.locator("select#role")).toBeVisible(); await expect(page.locator("input#department")).toHaveCount(0); await expect(page.getByText(/대표 소속/i)).toHaveCount(0); @@ -593,7 +593,9 @@ test.describe("User Management", () => { ], }, }); - expect(createPayload).not.toHaveProperty("role"); + expect(createPayload).toMatchObject({ + role: "user", + }); expect(createPayload).not.toHaveProperty("department"); expect(createPayload).not.toHaveProperty("tenantSlug"); expect(createPayload).not.toHaveProperty("companyCode");