1
0
forked from baron/baron-sso

조직도 M2M조회 추가, 자동로그인 보완

This commit is contained in:
2026-05-13 13:44:30 +09:00
parent 72288f1d39
commit 8c2b2f71ef
29 changed files with 2985 additions and 81 deletions

View File

@@ -616,6 +616,69 @@ test.describe("Tenants Management", () => {
).toBeVisible();
});
test("should export selected tenant children with UUIDs from organization tab", async ({
page,
}) => {
const parentId = "11111111-2222-4333-8444-555555555555";
const childId = "aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee";
let exportUrl = "";
const mockTenants = [
{
id: parentId,
name: "Parent Org",
slug: "parent-org",
status: "active",
type: "COMPANY",
memberCount: 5,
parentId: null,
},
{
id: childId,
name: "Child Org",
slug: "child-org",
status: "active",
type: "ORGANIZATION",
memberCount: 2,
parentId,
},
];
await page.route("**/api/v1/admin/tenants**", async (route) => {
const url = route.request().url();
const headers = { "Access-Control-Allow-Origin": "*" };
if (url.includes("/export")) {
exportUrl = url;
return route.fulfill({
body: "tenant_id,name,type,parent_tenant_id,parent_tenant_slug,slug,memo,email_domain,visibility,org_unit_type\n",
contentType: "text/csv",
headers: {
...headers,
"Content-Disposition": 'attachment; filename="tenants.csv"',
},
});
}
if (url.includes(`/admin/tenants/${parentId}`)) {
return route.fulfill({ json: mockTenants[0], headers });
}
return route.fulfill({
json: { items: mockTenants, total: 2, limit: 1000, offset: 0 },
headers,
});
});
await page.goto(`/tenants/${parentId}/organization`);
await expect(page.getByRole("heading", { name: "Child Org" })).toBeVisible({
timeout: 20000,
});
const download = page.waitForEvent("download");
await page.getByTestId("tenant-subtree-export-btn").click();
await download;
expect(exportUrl).toContain("includeIds=true");
expect(exportUrl).toContain(`parentId=${parentId}`);
});
test("should show tenant UUID at the top of tenant detail profile", async ({
page,
}) => {