1
0
forked from baron/baron-sso

린트 적용

This commit is contained in:
2026-03-05 17:50:34 +09:00
parent c2b55081a6
commit 45ae1bb1c0
21 changed files with 1114 additions and 810 deletions

View File

@@ -21,14 +21,22 @@ test.describe("Users Bulk Upload", () => {
});
// Mock OIDC config
await page.route("**/oidc/.well-known/openid-configuration", async (route) => {
await route.fulfill({ json: { issuer: "http://localhost:5000/oidc" } });
});
await page.route(
"**/oidc/.well-known/openid-configuration",
async (route) => {
await route.fulfill({ json: { issuer: "http://localhost:5000/oidc" } });
},
);
// Mock user profile
await page.route("**/api/v1/user/me", async (route) => {
await route.fulfill({
json: { id: "admin-user", name: "Admin User", email: "admin@example.com", role: "super_admin" },
json: {
id: "admin-user",
name: "Admin User",
email: "admin@example.com",
role: "super_admin",
},
});
});
@@ -42,13 +50,19 @@ test.describe("Users Bulk Upload", () => {
test("should open bulk upload modal and show preview", async ({ page }) => {
await page.goto("/users");
const bulkBtn = page.getByRole("button", { name: /일괄 등록|Bulk Import/i });
const bulkBtn = page.getByRole("button", {
name: /일괄 등록|Bulk Import/i,
});
await expect(bulkBtn).toBeVisible();
await bulkBtn.click();
await expect(page.getByText(/사용자 일괄 등록|User Bulk Upload/i)).toBeVisible();
await expect(page.getByRole("button", { name: /템플릿 다운로드|Download Template/i })).toBeVisible();
await expect(
page.getByText(/사용자 일괄 등록|User Bulk Upload/i),
).toBeVisible();
await expect(
page.getByRole("button", { name: /템플릿 다운로드|Download Template/i }),
).toBeVisible();
});
test("should show success results after mock upload", async ({ page }) => {
@@ -58,7 +72,11 @@ test.describe("Users Bulk Upload", () => {
json: {
results: [
{ email: "success@test.com", success: true, userId: "u-1" },
{ email: "fail@test.com", success: false, message: "Invalid format" },
{
email: "fail@test.com",
success: false,
message: "Invalid format",
},
],
},
});
@@ -69,7 +87,9 @@ test.describe("Users Bulk Upload", () => {
// Directly set internal state for testing results view if file simulation is hard
// But let's assume we want to see the "Start Upload" button disabled initially
const uploadBtn = page.getByRole("button", { name: /등록 시작|Start Upload/i });
const uploadBtn = page.getByRole("button", {
name: /등록 시작|Start Upload/i,
});
await expect(uploadBtn).toBeDisabled();
});
});