diff --git a/adminfront/tests/bulk_actions.spec.ts b/adminfront/tests/bulk_actions.spec.ts index ab597de5..bfd1b36d 100644 --- a/adminfront/tests/bulk_actions.spec.ts +++ b/adminfront/tests/bulk_actions.spec.ts @@ -87,8 +87,12 @@ test.describe("Bulk Actions and Tree Search", () => { if (url.includes("/admin/tenants")) { return route.fulfill({ json: { - items: [{ id: "t-1", name: "Main Tenant", slug: "main" }], - total: 1, + items: [ + { id: "t-1", name: "Main Tenant", slug: "main", type: "COMPANY" }, + { id: "g-1", name: "Engineering", slug: "eng", parentId: "t-1", type: "USER_GROUP" }, + { id: "g-2", name: "Sales", slug: "sales", parentId: "t-1", type: "USER_GROUP" }, + ], + total: 3, }, headers, }); @@ -157,11 +161,11 @@ test.describe("Bulk Actions and Tree Search", () => { await searchInput.fill("Eng"); - const engRow = page - .locator("tr") + const engNode = page + .locator("button") .filter({ hasText: "Engineering" }) .first(); - await expect(engRow).toBeVisible(); - await expect(engRow).toHaveClass(/bg-primary/); + await expect(engNode).toBeVisible(); + await expect(engNode).toHaveClass(/bg-primary\/5/); }); }); diff --git a/adminfront/tests/tenants.spec.ts b/adminfront/tests/tenants.spec.ts index 2cdea7a7..2f5eab8e 100644 --- a/adminfront/tests/tenants.spec.ts +++ b/adminfront/tests/tenants.spec.ts @@ -175,27 +175,17 @@ test.describe("Tenants Management", () => { }); await page.goto("/tenants/parent-1/organization"); - await expect(page.locator("table")).toContainText("Parent Org", { - timeout: 20000, - }); - - const parentRow = page - .locator("tr") - .filter({ hasText: "Parent Org" }) - .first(); - await expect(parentRow).toContainText("5"); - - const memberButton = parentRow - .getByRole("button") - .filter({ hasText: /Direct|소속|직속/ }) - .first(); - await memberButton.click(); await expect( - page - .locator('button[role="tab"]') - .filter({ hasText: /소속 멤버|Direct Members/i }) - .first(), + page.locator(".font-bold, h2").filter({ hasText: "Parent Org" }).first() + ).toBeVisible({ timeout: 20000 }); + + await expect( + page.locator(".grid .font-bold, .grid .text-sm").filter({ hasText: "Child Team" }).first() + ).toBeVisible(); + + await expect( + page.locator("h3").filter({ hasText: /소속 멤버|Members/i }).first() ).toBeVisible(); }); });