forked from baron/baron-sso
dev 브런치 반영 code-check 오류 수정
This commit is contained in:
@@ -6,8 +6,7 @@ const configuredWorkers = process.env.PLAYWRIGHT_WORKERS
|
||||
const skipWebServer =
|
||||
process.env.PLAYWRIGHT_SKIP_WEBSERVER === "1" ||
|
||||
process.env.PLAYWRIGHT_SKIP_WEBSERVER === "true";
|
||||
const baseURL =
|
||||
process.env.PLAYWRIGHT_BASE_URL || "http://localhost:5174";
|
||||
const baseURL = process.env.PLAYWRIGHT_BASE_URL || "http://localhost:5174";
|
||||
|
||||
/**
|
||||
* Read environment variables from file.
|
||||
|
||||
@@ -34,7 +34,10 @@ export const router = createBrowserRouter(
|
||||
{ path: "clients/:id", element: <ClientDetailsPage /> },
|
||||
{ path: "clients/:id/consents", element: <ClientConsentsPage /> },
|
||||
{ path: "clients/:id/settings", element: <ClientGeneralPage /> },
|
||||
{ path: "clients/:id/relationships", element: <ClientRelationsPage /> },
|
||||
{
|
||||
path: "clients/:id/relationships",
|
||||
element: <ClientRelationsPage />,
|
||||
},
|
||||
{ path: "audit-logs", element: <AuditLogsPage /> },
|
||||
{ path: "profile", element: <ProfilePage /> },
|
||||
],
|
||||
|
||||
@@ -465,10 +465,18 @@ function ClientConsentsPage() {
|
||||
<TableBody>
|
||||
{filteredRows.length === 0 && !isLoading && !error ? (
|
||||
<TableRow>
|
||||
<TableCell colSpan={7} className="h-32 text-center text-muted-foreground">
|
||||
<TableCell
|
||||
colSpan={7}
|
||||
className="h-32 text-center text-muted-foreground"
|
||||
>
|
||||
<div className="flex flex-col items-center gap-2">
|
||||
<Search className="h-8 w-8 opacity-20" />
|
||||
<p>{t("msg.dev.clients.consents.empty", "No consents found.")}</p>
|
||||
<p>
|
||||
{t(
|
||||
"msg.dev.clients.consents.empty",
|
||||
"No consents found.",
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
|
||||
@@ -110,7 +110,8 @@ function ClientRelationsPage() {
|
||||
if (isSuperAdmin) return true;
|
||||
if (!relationData?.items || !myUserId) return false;
|
||||
return relationData.items.some(
|
||||
(item) => item.subject === `User:${myUserId}` && item.relation === "admins"
|
||||
(item) =>
|
||||
item.subject === `User:${myUserId}` && item.relation === "admins",
|
||||
);
|
||||
}, [relationData?.items, myUserId, isSuperAdmin]);
|
||||
|
||||
@@ -664,7 +665,9 @@ function ClientRelationsPage() {
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="gap-2 text-destructive hover:text-destructive"
|
||||
disabled={removeMutation.isPending || !canManageRelations}
|
||||
disabled={
|
||||
removeMutation.isPending || !canManageRelations
|
||||
}
|
||||
onClick={() =>
|
||||
handleRemove(item.relation, item.subject)
|
||||
}
|
||||
|
||||
@@ -36,6 +36,14 @@ test.describe("DevFront relationships", () => {
|
||||
],
|
||||
relations: {
|
||||
"client-rel": [
|
||||
{
|
||||
relation: "admins",
|
||||
subject: "User:playwright-user",
|
||||
subjectType: "User",
|
||||
subjectId: "playwright-user",
|
||||
userName: "Playwright User",
|
||||
userEmail: "playwright@example.com",
|
||||
},
|
||||
{
|
||||
relation: "config_editor",
|
||||
subject: "User:user-1",
|
||||
@@ -67,13 +75,16 @@ test.describe("DevFront relationships", () => {
|
||||
await page.getByLabel(/동의 조회/).check();
|
||||
await page.getByRole("button", { name: /^추가$/ }).click();
|
||||
|
||||
await expect(page.getByText("User:user-2")).toBeVisible();
|
||||
await expect.poll(() => state.relations["client-rel"]?.length ?? 0).toBe(3);
|
||||
await expect(
|
||||
page.locator("tr").filter({ hasText: "User:user-2" }).first(),
|
||||
).toBeVisible();
|
||||
await expect.poll(() => state.relations["client-rel"]?.length ?? 0).toBe(4);
|
||||
|
||||
await page
|
||||
.locator("tr")
|
||||
.filter({ hasText: "User:user-2" })
|
||||
.getByRole("button", { name: /Delete|삭제/i })
|
||||
.first()
|
||||
.click();
|
||||
|
||||
await expect
|
||||
|
||||
@@ -32,7 +32,9 @@ test.describe("DevFront role report", () => {
|
||||
page.getByText(/조회 가능한 RP가 없습니다|No RPs are available/i),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByText(/연동 앱|Connected Application/i),
|
||||
page.getByRole("heading", {
|
||||
name: /^연동 앱$|^Connected Application$/i,
|
||||
}),
|
||||
).toBeVisible();
|
||||
await captureEvidence(page, testInfo, "role-user-empty-rps");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user