1
0
forked from baron/baron-sso

feat: improve Worksmobile tenant sync handling

This commit is contained in:
2026-06-02 18:05:36 +09:00
parent d6d39ca300
commit d32ca69eee
58 changed files with 4035 additions and 1400 deletions

View File

@@ -729,7 +729,6 @@ test.describe("User Management", () => {
await expect(page.getByTestId("appointment-position-line-0")).toBeVisible();
await page.getByRole("switch", { name: /대표 조직/i }).click();
await page.getByLabel(/^직무$/i).fill("플랫폼 운영");
await page.getByLabel(/^직급$/i).fill("책임");
await page.getByLabel(/^직책$/i).fill("팀장");
await page.locator('input[name="name"]').fill("Family User");
@@ -829,6 +828,7 @@ test.describe("User Management", () => {
test("should show Hanmac family appointments layout on user detail", async ({
page,
}) => {
await page.setViewportSize({ width: 520, height: 900 });
await page.route(/\/admin\/users\/u-1$/, async (route) => {
if (route.request().method() === "GET") {
return route.fulfill({
@@ -847,7 +847,7 @@ test.describe("User Management", () => {
{
tenantId: "03dbe16b-e47b-4f72-927b-782807d67a35",
tenantSlug: "tech-planning",
tenantName: "기술기획",
tenantName: "기술기획 장기 운영 전략 조직",
isPrimary: true,
isOwner: true,
grade: "책임",
@@ -872,6 +872,32 @@ test.describe("User Management", () => {
await expect(
page.getByTestId("detail-appointment-tenant-owner-line-0"),
).toContainText(/기술기획|대표 조직|조직장/);
await expect(
page.getByTestId("detail-appointment-tenant-owner-controls-0"),
).toHaveCSS("flex-wrap", "nowrap");
const tenantPickerBox = await page
.getByTestId("detail-appointment-tenant-picker-0")
.boundingBox();
const ownerSwitchBox = await page
.getByTestId("detail-appointment-row-0")
.getByRole("switch", { name: /대표 조직/i })
.boundingBox();
const managerSwitchBox = await page
.getByTestId("detail-appointment-row-0")
.getByRole("switch", { name: /조직장/i })
.boundingBox();
if (!tenantPickerBox || !ownerSwitchBox || !managerSwitchBox) {
throw new Error("Appointment tenant owner controls are not visible.");
}
const centerYs = [
tenantPickerBox.y + tenantPickerBox.height / 2,
ownerSwitchBox.y + ownerSwitchBox.height / 2,
managerSwitchBox.y + managerSwitchBox.height / 2,
];
expect(Math.max(...centerYs) - Math.min(...centerYs)).toBeLessThan(8);
await expect(
page.getByTestId("detail-appointment-row-0").getByRole("switch", {
name: /대표 조직/i,