1
0
forked from baron/baron-sso

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.
This commit is contained in:
2026-05-13 15:00:17 +09:00
parent 3a3bfd3c00
commit 9681945f5a
2 changed files with 5 additions and 5 deletions

View File

@@ -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 }) => {

View File

@@ -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");