1
0
forked from baron/baron-sso

테넌트 목록 조회 cursor기반으로 재구성. 사용자 metadata 미사용 필드 제거

This commit is contained in:
2026-05-13 18:05:51 +09:00
parent a4d707d4d8
commit 5e7b7b878c
85 changed files with 4808 additions and 734 deletions

View File

@@ -37,6 +37,15 @@ test.describe("Bulk Actions and Tree Search", () => {
headers,
});
}
if (
url.includes("/admin/users/bulk") &&
route.request().method() === "PUT"
) {
return route.fulfill({
json: { results: [{ id: "u-1", success: true }] },
headers,
});
}
if (url.includes("/admin/users")) {
return route.fulfill({
json: {
@@ -149,6 +158,41 @@ test.describe("Bulk Actions and Tree Search", () => {
await expect(selectionBar).not.toBeVisible({ timeout: 10000 });
});
test("should let super admins promote selected users to super admin", async ({
page,
}) => {
let capturedPayload: unknown = null;
await page.route("**/api/v1/admin/users/bulk", async (route) => {
if (route.request().method() === "PUT") {
capturedPayload = route.request().postDataJSON();
return route.fulfill({
json: { results: [{ id: "u-1", success: true }] },
headers: { "Access-Control-Allow-Origin": "*" },
});
}
return route.fallback();
});
await page.goto("/users");
await expect(page.locator("table")).toContainText("User One", {
timeout: 20000,
});
await page.locator('table input[type="checkbox"]').nth(1).click();
const selectionBar = page.getByTestId("bulk-action-bar");
await expect(selectionBar).toBeVisible({ timeout: 15000 });
await page.getByTestId("bulk-promote-super-admin-btn").click();
await expect
.poll(() => capturedPayload)
.toEqual({
userIds: ["u-1"],
role: "super_admin",
});
await expect(selectionBar).not.toBeVisible({ timeout: 10000 });
});
test("should filter and highlight nodes in organization tree", async ({
page,
}) => {