1
0
forked from baron/baron-sso

code-check 오류 수정

This commit is contained in:
2026-03-25 17:51:29 +09:00
parent ced369cdbc
commit 31b4e6b5f3
10 changed files with 864 additions and 868 deletions

View File

@@ -1,38 +1,23 @@
import { expect, test } from "@playwright/test";
import { seedAuth } from "./helpers/devfront-fixtures";
import {
type Consent,
installDevApiMock,
makeClient,
seedAuth,
} from "./helpers/devfront-fixtures";
test("clients page loads correctly", async ({ page }) => {
await seedAuth(page);
await page.route("**/api/v1/dev/clients**", async (route) => {
if (route.request().method() !== "GET") {
await route.fulfill({
status: 404,
contentType: "application/json",
body: JSON.stringify({ error: "Not found" }),
});
return;
}
await route.fulfill({
status: 200,
contentType: "application/json",
body: JSON.stringify({
items: [
{
id: "client-playwright",
name: "Playwright Client",
type: "private",
status: "active",
createdAt: new Date().toISOString(),
redirectUris: ["http://localhost:5174/callback"],
scopes: ["openid", "profile", "email"],
},
],
limit: 50,
offset: 0,
await installDevApiMock(page, {
clients: [
makeClient("client-playwright", {
name: "Playwright Client",
createdAt: new Date().toISOString(),
redirectUris: ["http://localhost:5174/callback"],
}),
});
],
consents: [] as Consent[],
auditLogsByCursor: undefined,
});
await page.goto("/clients");
@@ -46,9 +31,9 @@ test("clients page loads correctly", async ({ page }) => {
// 테이블 헤더 확인
await expect(
page.getByRole("columnheader", { name: "애플리케이션" }),
page.locator("th").filter({ hasText: "애플리케이션" }),
).toBeVisible();
await expect(
page.getByRole("columnheader", { name: "Client ID" }),
page.locator("th").filter({ hasText: /클라이언트 ID|Client ID/i }),
).toBeVisible();
});