forked from baron/baron-sso
orgfront refresh token 관리 추가
This commit is contained in:
@@ -43,6 +43,9 @@ function user(id: string, name: string, companyCode: string) {
|
||||
status: "active",
|
||||
companyCode,
|
||||
grade: "사원",
|
||||
metadata: {
|
||||
additionalAppointments: [{ tenantSlug: companyCode }],
|
||||
},
|
||||
createdAt: "2026-04-01T00:00:00.000Z",
|
||||
updatedAt: "2026-04-01T00:00:00.000Z",
|
||||
};
|
||||
@@ -338,7 +341,8 @@ test("org chart renders dense member nodes with calculated member columns", asyn
|
||||
await expect(page.getByRole("heading", { name: "조직 현황" })).toBeVisible();
|
||||
|
||||
const rootNode = page.locator('[data-testid="orgchart-node-root"]');
|
||||
await expect(rootNode).toHaveAttribute("width", /3\d{2}/);
|
||||
await expect(rootNode).toHaveAttribute("width", /\d+/);
|
||||
expect(Number(await rootNode.getAttribute("width"))).toBeGreaterThan(240);
|
||||
await expect(rootNode.locator('[data-member-columns="2"]')).toBeVisible();
|
||||
await expect(rootNode.getByText("Dense User 10")).toBeVisible();
|
||||
});
|
||||
|
||||
@@ -46,6 +46,7 @@ test("orgfront login waits for explicit auto parameter", async ({ page }) => {
|
||||
|
||||
test("orgfront login auto parameter starts OIDC authorization", async ({
|
||||
page,
|
||||
baseURL,
|
||||
}) => {
|
||||
const oidc = await stubOidcAuthorization(page);
|
||||
|
||||
@@ -55,11 +56,15 @@ test("orgfront login auto parameter starts OIDC authorization", async ({
|
||||
|
||||
const parsed = new URL(oidc.authorizationURL());
|
||||
expect(parsed.searchParams.get("client_id")).toBe("orgfront");
|
||||
expect(parsed.searchParams.get("redirect_uri")).toBe(
|
||||
"http://127.0.0.1:4175/auth/callback",
|
||||
);
|
||||
const redirectUri = new URL(parsed.searchParams.get("redirect_uri") ?? "");
|
||||
const appUrl = new URL(baseURL ?? page.url());
|
||||
expect(["localhost", "127.0.0.1"]).toContain(redirectUri.hostname);
|
||||
expect(redirectUri.port).toBe(appUrl.port);
|
||||
expect(redirectUri.pathname).toBe("/auth/callback");
|
||||
expect(parsed.searchParams.get("response_type")).toBe("code");
|
||||
expect(parsed.searchParams.get("scope") ?? "").toContain("openid");
|
||||
expect((parsed.searchParams.get("scope") ?? "").split(/\s+/)).toEqual(
|
||||
expect.arrayContaining(["openid", "offline_access", "profile", "email"]),
|
||||
);
|
||||
});
|
||||
|
||||
test("orgfront login can opt out of default OIDC authorization", async ({
|
||||
|
||||
Reference in New Issue
Block a user