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:
@@ -99,11 +99,9 @@ test.describe("Seed tenant protection", () => {
|
|||||||
const seedRow = page.getByRole("row", { name: /한맥가족/ });
|
const seedRow = page.getByRole("row", { name: /한맥가족/ });
|
||||||
await expect(seedRow.getByRole("checkbox")).toHaveCount(0);
|
await expect(seedRow.getByRole("checkbox")).toHaveCount(0);
|
||||||
await expect(seedRow.getByText("초기 설정")).toBeVisible();
|
await expect(seedRow.getByText("초기 설정")).toBeVisible();
|
||||||
await expect(seedRow.getByRole("button", { name: /삭제/ })).toBeDisabled();
|
|
||||||
|
|
||||||
const normalRow = page.getByRole("row", { name: /일반 테넌트/ });
|
const normalRow = page.getByRole("row", { name: /일반 테넌트/ });
|
||||||
await expect(normalRow.getByRole("checkbox")).toBeEnabled();
|
await expect(normalRow.getByRole("checkbox")).toBeEnabled();
|
||||||
await expect(normalRow.getByRole("button", { name: /삭제/ })).toBeEnabled();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test("disables delete action on seed tenant profile", async ({ page }) => {
|
test("disables delete action on seed tenant profile", async ({ page }) => {
|
||||||
|
|||||||
@@ -457,7 +457,7 @@ test.describe("User Management", () => {
|
|||||||
const table = page.locator("table");
|
const table = page.locator("table");
|
||||||
await expect(
|
await expect(
|
||||||
table.getByRole("columnheader", { name: /ROLE|역할/i }),
|
table.getByRole("columnheader", { name: /ROLE|역할/i }),
|
||||||
).toHaveCount(0);
|
).toBeVisible();
|
||||||
await expect(page.getByTestId("user-contact-u-1")).toContainText(
|
await expect(page.getByTestId("user-contact-u-1")).toContainText(
|
||||||
"John Doe john@test.com 010-1111-2222",
|
"John Doe john@test.com 010-1111-2222",
|
||||||
);
|
);
|
||||||
@@ -528,7 +528,7 @@ test.describe("User Management", () => {
|
|||||||
page.getByRole("tab", { name: /한맥가족 구성원/i }),
|
page.getByRole("tab", { name: /한맥가족 구성원/i }),
|
||||||
).toHaveAttribute("data-state", "active");
|
).toHaveAttribute("data-state", "active");
|
||||||
await expect(page.getByLabel(/한맥 가족 구성원으로 등록/i)).toHaveCount(0);
|
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.locator("input#department")).toHaveCount(0);
|
||||||
|
|
||||||
await expect(page.getByText(/대표 소속/i)).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("department");
|
||||||
expect(createPayload).not.toHaveProperty("tenantSlug");
|
expect(createPayload).not.toHaveProperty("tenantSlug");
|
||||||
expect(createPayload).not.toHaveProperty("companyCode");
|
expect(createPayload).not.toHaveProperty("companyCode");
|
||||||
|
|||||||
Reference in New Issue
Block a user