1
0
forked from baron/baron-sso

worksmobile 연동 & ory stack 26.2.0으로 업그레이드

This commit is contained in:
2026-05-06 09:30:00 +09:00
parent 3dcdd97882
commit 2495fcb13d
74 changed files with 8698 additions and 212 deletions

View File

@@ -703,6 +703,7 @@ test.describe("User Management", () => {
tenantId: "03dbe16b-e47b-4f72-927b-782807d67a35",
tenantSlug: "tech-planning",
tenantName: "기술기획",
isPrimary: true,
isOwner: true,
jobTitle: "플랫폼 운영",
position: "책임",
@@ -724,12 +725,115 @@ test.describe("User Management", () => {
await expect(page.getByTestId("detail-appointment-row-0")).toBeVisible();
await expect(
page.getByTestId("detail-appointment-tenant-owner-line-0"),
).toContainText(/기술기획|조직장/);
).toContainText(/기술기획|대표 조직|조직장/);
await expect(
page.getByTestId("detail-appointment-row-0").getByRole("switch", {
name: /대표 조직/i,
}),
).toBeChecked();
await expect(
page.getByTestId("detail-appointment-row-0").getByRole("switch", {
name: /대표 조직/i,
}),
).toBeDisabled();
await expect(
page.getByTestId("detail-appointment-position-line-0"),
).toBeVisible();
});
test("should save selected Hanmac representative appointment from user detail", async ({
page,
}) => {
let updatePayload: Record<string, unknown> | undefined;
await page.route(/\/admin\/users\/u-1$/, async (route) => {
if (route.request().method() === "GET") {
return route.fulfill({
json: {
id: "u-1",
name: "Family User",
email: "family@test.com",
phone: "010-1111-2222",
loginId: "familyuser",
role: "user",
status: "active",
createdAt: "2026-04-01T00:00:00Z",
updatedAt: "2026-04-01T00:00:00Z",
metadata: {
hanmacFamily: true,
additionalAppointments: [
{
tenantId: "03dbe16b-e47b-4f72-927b-782807d67a35",
tenantSlug: "tech-planning",
tenantName: "기술기획",
isOwner: false,
jobTitle: "플랫폼 운영",
position: "책임",
},
{
tenantId: "hanmac-team-id",
tenantSlug: "hanmac-team",
tenantName: "한맥팀",
isOwner: true,
jobTitle: "개발",
position: "선임",
},
],
},
},
});
}
if (route.request().method() === "PUT") {
updatePayload = route.request().postDataJSON();
return route.fulfill({
json: {
id: "u-1",
name: "Family User",
email: "family@test.com",
status: "active",
},
});
}
return route.fallback();
});
await page.goto("/users/u-1");
await page
.getByTestId("detail-appointment-row-1")
.getByRole("switch", { name: /대표 조직/i })
.click();
await expect(
page.getByTestId("detail-appointment-row-0").getByRole("switch", {
name: /대표 조직/i,
}),
).not.toBeChecked();
await expect(
page.getByTestId("detail-appointment-row-1").getByRole("switch", {
name: /대표 조직/i,
}),
).toBeChecked();
await page.locator("form").evaluate((form) => {
(form as HTMLFormElement).requestSubmit();
});
await expect.poll(() => updatePayload).toMatchObject({
tenantSlug: "hanmac-team",
primaryTenantId: "hanmac-team-id",
primaryTenantName: "한맥팀",
primaryTenantIsOwner: true,
metadata: {
primaryTenantId: "hanmac-team-id",
primaryTenantName: "한맥팀",
primaryTenantSlug: "hanmac-team",
primaryTenantIsOwner: true,
additionalAppointments: [
{ tenantId: "03dbe16b-e47b-4f72-927b-782807d67a35", isPrimary: false },
{ tenantId: "hanmac-team-id", isPrimary: true },
],
},
});
});
test("should show conflict error when creating with an existing Login ID", async ({
page,
}) => {