forked from baron/baron-sso
feat: integrate orgfront and expose internal ids
This commit is contained in:
@@ -100,6 +100,16 @@ test.describe("Authentication", () => {
|
||||
);
|
||||
});
|
||||
|
||||
test("should link org chart navigation through the auto login entry", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/");
|
||||
await expect(page.getByRole("link", { name: "조직도" })).toHaveAttribute(
|
||||
"href",
|
||||
"http://localhost:5175/login?auto=1&returnTo=%2Fchart",
|
||||
);
|
||||
});
|
||||
|
||||
test("should logout and redirect to login page", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
page.on("dialog", (dialog) => dialog.accept());
|
||||
|
||||
@@ -57,13 +57,15 @@ test.describe("Tenants Management", () => {
|
||||
});
|
||||
|
||||
test("should list tenants", async ({ page }) => {
|
||||
const internalTenantId = "c5839444-2de0-4a37-99b0-4f94d3de8bea";
|
||||
|
||||
await page.route("**/api/v1/admin/tenants**", async (route) => {
|
||||
if (route.request().method() === "GET") {
|
||||
await route.fulfill({
|
||||
json: {
|
||||
items: [
|
||||
{
|
||||
id: "1",
|
||||
id: internalTenantId,
|
||||
name: "Tenant A",
|
||||
slug: "tenant-a",
|
||||
status: "active",
|
||||
@@ -90,6 +92,7 @@ test.describe("Tenants Management", () => {
|
||||
await expect(page.locator("table")).toContainText("Tenant A", {
|
||||
timeout: 10000,
|
||||
});
|
||||
await expect(page.locator("table")).toContainText(internalTenantId);
|
||||
});
|
||||
|
||||
test("should create a new tenant", async ({ page }) => {
|
||||
|
||||
@@ -465,6 +465,40 @@ test.describe("User Management", () => {
|
||||
.toMatchObject({ status: "inactive" });
|
||||
});
|
||||
|
||||
test("should expose internal user uuid in the users table", async ({
|
||||
page,
|
||||
}) => {
|
||||
const internalUserId = "4d20c735-05d0-42d4-9479-0e9be74fd987";
|
||||
|
||||
await page.route(/\/admin\/users(\?.*)?$/, async (route) => {
|
||||
if (route.request().method() !== "GET") {
|
||||
return route.fallback();
|
||||
}
|
||||
return route.fulfill({
|
||||
json: {
|
||||
items: [
|
||||
{
|
||||
id: internalUserId,
|
||||
name: "UUID User",
|
||||
email: "uuid-user@test.com",
|
||||
phone: "010-2222-3333",
|
||||
loginId: "uuid_login_id",
|
||||
role: "user",
|
||||
status: "active",
|
||||
createdAt: "2026-04-01T00:00:00Z",
|
||||
},
|
||||
],
|
||||
total: 1,
|
||||
limit: 50,
|
||||
offset: 0,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
await page.goto("/users");
|
||||
await expect(page.locator("table")).toContainText(internalUserId);
|
||||
});
|
||||
|
||||
test("should create a Hanmac family user with tenant appointments and no representative affiliation", async ({
|
||||
page,
|
||||
}) => {
|
||||
|
||||
Reference in New Issue
Block a user