forked from baron/baron-sso
개요 차단 화면에 개발자 권한 신청 버튼 추가
This commit is contained in:
@@ -39,6 +39,33 @@ test.describe("DevFront role report", () => {
|
||||
await captureEvidence(page, testInfo, "role-user-empty-rps");
|
||||
});
|
||||
|
||||
test("user sees developer request entry point on overview", async ({
|
||||
page,
|
||||
}, testInfo) => {
|
||||
await seedAuth(page, "user");
|
||||
await installDevApiMock(page, {
|
||||
clients: [],
|
||||
consents: [] as Consent[],
|
||||
auditLogs: [] as AuditLog[],
|
||||
auditLogsByCursor: undefined,
|
||||
developerRequests: [],
|
||||
});
|
||||
|
||||
await page.goto("/");
|
||||
await expect(
|
||||
page.getByText(
|
||||
/대시보드는 개발자 권한이 있어야 볼 수 있습니다|개발자 권한 신청을 검토 중입니다./,
|
||||
),
|
||||
).toBeVisible();
|
||||
const requestBtn = page.getByRole("button", {
|
||||
name: /개발자 권한 신청/,
|
||||
});
|
||||
await expect(requestBtn).toBeVisible();
|
||||
await requestBtn.click();
|
||||
await expect(page).toHaveURL(/\/developer-requests$/);
|
||||
await captureEvidence(page, testInfo, "role-user-overview-request-entry");
|
||||
});
|
||||
|
||||
test("rp_admin sees only assigned Gitea app and its logs", async ({
|
||||
page,
|
||||
}, testInfo) => {
|
||||
|
||||
@@ -408,6 +408,15 @@ export async function installDevApiMock(page: Page, state: DevApiMockState) {
|
||||
});
|
||||
}
|
||||
|
||||
if (pathname === "/api/v1/dev/rp-usage/daily" && method === "GET") {
|
||||
return json(route, {
|
||||
items: [],
|
||||
days: Number.parseInt(searchParams.get("days") || "14", 10),
|
||||
period:
|
||||
(searchParams.get("period") as "day" | "week" | "month") || "day",
|
||||
});
|
||||
}
|
||||
|
||||
if (pathname === "/api/v1/dev/clients" && method === "GET") {
|
||||
return json(route, {
|
||||
items: state.clients.map((client) => ({
|
||||
|
||||
Reference in New Issue
Block a user