forked from baron/baron-sso
custom claim 타입보정 UI. 대표테넌트 노출 보정
This commit is contained in:
@@ -2,7 +2,7 @@ import { expect, test } from "@playwright/test";
|
||||
|
||||
const tenants = [
|
||||
{
|
||||
id: "seed-hanmac",
|
||||
id: "038326b6-954a-48a7-a85f-efd83f62b82a",
|
||||
name: "한맥가족",
|
||||
slug: "hanmac-family",
|
||||
type: "COMPANY_GROUP",
|
||||
@@ -13,6 +13,19 @@ const tenants = [
|
||||
createdAt: "",
|
||||
updatedAt: "",
|
||||
},
|
||||
{
|
||||
id: "5a03efd2-e62f-4243-800d-58334bf48b2f",
|
||||
name: "한라산업개발",
|
||||
slug: "hallasanup",
|
||||
type: "COMPANY",
|
||||
description: "네이버웍스 한라 HALLA_DOMAIN_ID",
|
||||
status: "active",
|
||||
domains: ["hallasanup.com"],
|
||||
memberCount: 0,
|
||||
parentId: "038326b6-954a-48a7-a85f-efd83f62b82a",
|
||||
createdAt: "",
|
||||
updatedAt: "",
|
||||
},
|
||||
{
|
||||
id: "normal-tenant",
|
||||
name: "일반 테넌트",
|
||||
@@ -96,11 +109,21 @@ test.describe("Seed tenant protection", () => {
|
||||
}) => {
|
||||
await page.goto("/tenants");
|
||||
|
||||
const seedRow = page.getByRole("row", { name: /한맥가족/ });
|
||||
const seedRow = page.getByRole("row").filter({
|
||||
has: page.getByRole("link", { name: "한맥가족", exact: true }),
|
||||
});
|
||||
await expect(seedRow.getByRole("checkbox")).toHaveCount(0);
|
||||
await expect(seedRow.getByText("초기 설정")).toBeVisible();
|
||||
|
||||
const normalRow = page.getByRole("row", { name: /일반 테넌트/ });
|
||||
const hallaRow = page.getByRole("row").filter({
|
||||
has: page.getByRole("link", { name: "한라산업개발", exact: true }),
|
||||
});
|
||||
await expect(hallaRow.getByRole("checkbox")).toHaveCount(0);
|
||||
await expect(hallaRow.getByText("초기 설정")).toBeVisible();
|
||||
|
||||
const normalRow = page.getByRole("row").filter({
|
||||
has: page.getByRole("link", { name: "일반 테넌트", exact: true }),
|
||||
});
|
||||
await expect(normalRow.getByRole("checkbox")).toBeEnabled();
|
||||
});
|
||||
|
||||
|
||||
@@ -293,6 +293,94 @@ test.describe("User Management", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test("should hide private representative tenants in the user list row", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.route(/\/admin\/tenants(\?.*)?$/, async (route) => {
|
||||
if (route.request().method() !== "GET") {
|
||||
return route.fallback();
|
||||
}
|
||||
return route.fulfill({
|
||||
json: {
|
||||
items: [
|
||||
{
|
||||
id: "tenant-private",
|
||||
name: "비공개 팀",
|
||||
slug: "private-team",
|
||||
type: "USER_GROUP",
|
||||
status: "active",
|
||||
config: { visibility: "private" },
|
||||
},
|
||||
{
|
||||
id: "tenant-public",
|
||||
name: "공개 팀",
|
||||
slug: "public-team",
|
||||
type: "USER_GROUP",
|
||||
status: "active",
|
||||
config: { visibility: "public" },
|
||||
},
|
||||
],
|
||||
total: 2,
|
||||
limit: 100,
|
||||
offset: 0,
|
||||
},
|
||||
});
|
||||
});
|
||||
await page.route(/\/admin\/users(\?.*)?$/, async (route) => {
|
||||
if (route.request().method() !== "GET") {
|
||||
return route.fallback();
|
||||
}
|
||||
return route.fulfill({
|
||||
json: {
|
||||
items: [
|
||||
{
|
||||
id: "u-private",
|
||||
name: "Private Primary User",
|
||||
email: "private-primary@example.com",
|
||||
phone: "010-0000-0000",
|
||||
loginId: "private-primary",
|
||||
role: "user",
|
||||
status: "active",
|
||||
tenantSlug: "private-team",
|
||||
tenant: {
|
||||
id: "tenant-private",
|
||||
name: "비공개 팀",
|
||||
slug: "private-team",
|
||||
config: { visibility: "private" },
|
||||
},
|
||||
joinedTenants: [
|
||||
{
|
||||
id: "tenant-public",
|
||||
name: "공개 팀",
|
||||
slug: "public-team",
|
||||
config: { visibility: "public" },
|
||||
},
|
||||
],
|
||||
metadata: {
|
||||
primaryTenantId: "tenant-private",
|
||||
primaryTenantSlug: "private-team",
|
||||
primaryTenantName: "비공개 팀",
|
||||
},
|
||||
createdAt: "2026-04-01T00:00:00Z",
|
||||
updatedAt: "2026-04-01T00:00:00Z",
|
||||
},
|
||||
],
|
||||
total: 1,
|
||||
limit: 50,
|
||||
offset: 0,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
await page.goto("/users");
|
||||
|
||||
const row = page.getByRole("row").filter({
|
||||
hasText: "Private Primary User",
|
||||
});
|
||||
await expect(row).toContainText("공개 팀");
|
||||
await expect(row).not.toContainText("비공개 팀");
|
||||
});
|
||||
|
||||
test("should successfully edit a user's Login ID", async ({ page }) => {
|
||||
await page.goto("/users/u-1");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user