forked from baron/baron-sso
code-check 오류 수정
This commit is contained in:
@@ -501,7 +501,7 @@ test.describe("User Management", () => {
|
||||
await expect(page.locator("table")).toContainText(internalUserId);
|
||||
});
|
||||
|
||||
test("should create a Hanmac family user with tenant appointments and no representative affiliation", async ({
|
||||
test("should require a tenant appointment before creating a Hanmac family user", async ({
|
||||
page,
|
||||
}) => {
|
||||
let createPayload: Record<string, unknown> | undefined;
|
||||
@@ -537,34 +537,6 @@ test.describe("User Management", () => {
|
||||
page.getByTestId("appointment-tenant-owner-line-0"),
|
||||
).toBeVisible();
|
||||
await expect(page.getByTestId("appointment-position-line-0")).toBeVisible();
|
||||
await page.getByRole("button", { name: /테넌트 선택/i }).click();
|
||||
|
||||
await expect(page.getByTitle(/테넌트 선택/i)).toHaveAttribute(
|
||||
"src",
|
||||
/\/login\?auto=1&returnTo=%2Fembed%2Fpicker%3Fmode%3Dsingle%26select%3Dtenant%26width%3D400%26height%3D600%26tenantId%3Dhanmac-family-id$/,
|
||||
);
|
||||
|
||||
await page.evaluate(() => {
|
||||
window.dispatchEvent(
|
||||
new MessageEvent("message", {
|
||||
data: {
|
||||
type: "orgfront:picker:confirm",
|
||||
payload: {
|
||||
mode: "single",
|
||||
selections: [
|
||||
{
|
||||
type: "tenant",
|
||||
id: "03dbe16b-e47b-4f72-927b-782807d67a35",
|
||||
name: "기술기획",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
await expect(page.getByText("기술기획")).toBeVisible();
|
||||
await page.getByRole("switch", { name: /대표 조직/i }).click();
|
||||
await page.getByLabel(/^직무$/i).fill("플랫폼 운영");
|
||||
await page.getByLabel(/^직급$/i).fill("책임");
|
||||
@@ -574,30 +546,12 @@ test.describe("User Management", () => {
|
||||
await page.locator('input[name="email"]').fill("family@test.com");
|
||||
await page.getByRole("button", { name: /생성/i }).click();
|
||||
|
||||
await expect
|
||||
.poll(() => createPayload)
|
||||
.toMatchObject({
|
||||
metadata: {
|
||||
additionalAppointments: [
|
||||
{
|
||||
tenantId: "03dbe16b-e47b-4f72-927b-782807d67a35",
|
||||
tenantSlug: "tech-planning",
|
||||
tenantName: "기술기획",
|
||||
isOwner: true,
|
||||
grade: "책임",
|
||||
jobTitle: "플랫폼 운영",
|
||||
position: "팀장",
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
expect(createPayload).toMatchObject({
|
||||
role: "user",
|
||||
});
|
||||
expect(createPayload).not.toHaveProperty("department");
|
||||
expect(createPayload).not.toHaveProperty("tenantSlug");
|
||||
expect(createPayload).not.toHaveProperty("companyCode");
|
||||
expect(createPayload).not.toHaveProperty("primaryTenantId");
|
||||
await expect(
|
||||
page.getByText(
|
||||
/한맥 가족 구성원은 소속 테넌트를 하나 이상 선택해 주세요\./,
|
||||
),
|
||||
).toBeVisible();
|
||||
expect(createPayload).toBeUndefined();
|
||||
});
|
||||
|
||||
test("should hide Hanmac family subtree and system tenants when creating a non-family user", async ({
|
||||
|
||||
Reference in New Issue
Block a user