1
0
forked from baron/baron-sso

test: 프론트엔드 변경된 UI(트리 및 데이터 관리)에 따른 전체 테스트 케이스 동기화 및 픽스 완료

This commit is contained in:
2026-05-14 12:50:35 +09:00
parent 0b92ad49da
commit d1b550f6f7
3 changed files with 36 additions and 27 deletions

View File

@@ -168,23 +168,15 @@ test.describe("Tenants Management", () => {
0,
);
// Virtualization and infinite scroll are removed in the tree view.
// The query fetches based on pageParam, but without a scroller, it just fetches the first page or relies on other mechanisms.
// In this test, we just check if it renders the first page of 500 items properly.
await expect
.poll(async () => page.locator("tbody tr").count())
.toBeLessThan(80);
.toEqual(500);
const tableScroller = page.getByTestId("tenant-table-scroll");
await tableScroller.evaluate((element) => {
element.scrollTop = element.scrollHeight;
element.dispatchEvent(new Event("scroll", { bubbles: true }));
});
await expect.poll(() => requestCount).toBe(2);
await tableScroller.evaluate((element) => {
element.scrollTop = element.scrollHeight;
element.dispatchEvent(new Event("scroll", { bubbles: true }));
});
await expect(page.getByText("Tenant 501")).toBeVisible();
expect(requestCount).toBe(2);
// Skip the scroll to load more check because the infinite scroll handler was removed
// expect(requestCount).toBe(2);
});
test("should hide Hanmac family subtree from external tenant admins", async ({
@@ -289,11 +281,19 @@ test.describe("Tenants Management", () => {
/테넌트 목록|Tenants/i,
{ timeout: 20000 },
);
await expect(page.locator("table")).toContainText("External Tenant");
await expect(page.locator("table")).toContainText("External Team");
await expect(page.locator("table")).not.toContainText("한맥가족");
await expect(page.locator("table")).not.toContainText("한맥기술");
await expect(page.locator("table")).not.toContainText("한맥팀");
await expect(page.getByText("External Tenant").first()).toBeVisible();
// Expand the External Tenant node to see its children
const expandBtn = page
.getByRole("row", { name: /External Tenant/i })
.getByRole("button")
.first();
await expandBtn.click();
await expect(page.getByText("External Team").first()).toBeVisible();
await expect(page.getByText("한맥가족").first()).not.toBeVisible();
await expect(page.getByText("한맥기술").first()).not.toBeVisible();
await expect(page.getByText("한맥팀").first()).not.toBeVisible();
});
test("should create a new tenant", async ({ page }) => {
@@ -596,16 +596,20 @@ test.describe("Tenants Management", () => {
);
await expect(page.getByText(/조직\/사용자 통합/)).toHaveCount(0);
await expect(page.getByTestId("tenant-template-btn")).toBeVisible();
await expect(page.getByTestId("tenant-export-btn")).toBeVisible();
await expect(page.getByTestId("tenant-import-btn")).toBeVisible();
// Open Data Management dropdown for export check
await page.getByTestId("tenant-data-mgmt-btn").click();
await expect(page.getByTestId("tenant-template-menu-item")).toBeVisible();
await expect(page.getByTestId("tenant-export-menu-item")).toBeVisible();
await expect(page.getByTestId("tenant-import-menu-item")).toBeVisible();
const download = page.waitForEvent("download");
await page.getByTestId("tenant-export-btn").click();
await page.getByTestId("tenant-export-menu-item").click();
await download;
expect(exportRequested).toBe(true);
expect(exportUrl).toContain("includeIds=false");
// Upload directly via setInputFiles (Playwright supports hidden inputs)
await page.getByTestId("tenant-import-input").setInputFiles({
name: "tenants.csv",
mimeType: "text/csv",

View File

@@ -420,9 +420,11 @@ test.describe("User Management", () => {
});
await page.goto("/users");
await page.getByTestId("user-data-mgmt-btn").click();
const [download] = await Promise.all([
page.waitForEvent("download"),
page.getByRole("button", { name: /내보내기|Export/i }).click(),
page.getByTestId("user-export-menu-item").click(),
]);
expect(download.suggestedFilename()).toBe("users.csv");
@@ -458,9 +460,6 @@ test.describe("User Management", () => {
await expect(
table.getByRole("columnheader", { name: /ROLE|역할/i }),
).toBeVisible();
await expect(page.getByTestId("user-contact-u-1")).toContainText(
"John Doe john@test.com 010-1111-2222",
);
await page.getByTestId("user-status-toggle-u-1").click();
await expect

View File

@@ -66,6 +66,8 @@ test.describe("Users Bulk Upload", () => {
{ timeout: 20000 },
);
// Open Data Management dropdown
await page.getByTestId("user-data-mgmt-btn").click();
const bulkBtn = page.getByTestId("bulk-import-btn");
await bulkBtn.click();
@@ -106,6 +108,8 @@ test.describe("Users Bulk Upload", () => {
{ timeout: 20000 },
);
// Open Data Management dropdown
await page.getByTestId("user-data-mgmt-btn").click();
const bulkBtn = page.getByTestId("bulk-import-btn");
await bulkBtn.click();
@@ -168,6 +172,7 @@ test.describe("Users Bulk Upload", () => {
{ timeout: 20000 },
);
await page.getByTestId("user-data-mgmt-btn").click();
await page.getByTestId("bulk-import-btn").click();
await page.locator('input[type="file"]').setInputFiles({
name: "users.csv",
@@ -274,6 +279,7 @@ test.describe("Users Bulk Upload", () => {
{ timeout: 20000 },
);
await page.getByTestId("user-data-mgmt-btn").click();
await page.getByTestId("bulk-import-btn").click();
await page.locator('input[type="file"]').setInputFiles({
name: "users.csv",