1
0
forked from baron/baron-sso

린트 적용용

This commit is contained in:
2026-03-27 21:37:40 +09:00
parent 809ece6a68
commit dcc5708d17

View File

@@ -152,7 +152,7 @@ test.describe("User Management", () => {
loginId: "johndoe", loginId: "johndoe",
role: "user", role: "user",
status: "active", status: "active",
} },
], ],
total: 1, total: 1,
limit: 50, limit: 50,
@@ -177,14 +177,20 @@ test.describe("User Management", () => {
await loginIdInput.fill("johndoe_updated"); await loginIdInput.fill("johndoe_updated");
// Submit the form // Submit the form
const saveButton = page.getByRole("button", { name: /변경사항 저장|Save/i }); const saveButton = page.getByRole("button", {
name: /변경사항 저장|Save/i,
});
await saveButton.click(); await saveButton.click();
// Check for success message // Check for success message
await expect(page.getByText(/사용자 정보가 수정되었습니다/i).first()).toBeVisible(); await expect(
page.getByText(/사용자 정보가 수정되었습니다/i).first(),
).toBeVisible();
}); });
test("should show conflict error when updating to an existing Login ID", async ({ page }) => { test("should show conflict error when updating to an existing Login ID", async ({
page,
}) => {
await page.goto("/users/u-1"); await page.goto("/users/u-1");
const loginIdInput = page.locator('input[id="loginId"]'); const loginIdInput = page.locator('input[id="loginId"]');
@@ -193,14 +199,20 @@ test.describe("User Management", () => {
// Enter a login ID that triggers our mock conflict error // Enter a login ID that triggers our mock conflict error
await loginIdInput.fill("existing_user"); await loginIdInput.fill("existing_user");
const saveButton = page.getByRole("button", { name: /변경사항 저장|Save/i }); const saveButton = page.getByRole("button", {
name: /변경사항 저장|Save/i,
});
await saveButton.click(); await saveButton.click();
// Check for the specific conflict error message from the backend mock // Check for the specific conflict error message from the backend mock
await expect(page.getByText(/이미 존재하는 로그인 ID 입니다/i)).toBeVisible(); await expect(
page.getByText(/이미 존재하는 로그인 ID 입니다/i),
).toBeVisible();
}); });
test("should successfully create a new user with a Login ID", async ({ page }) => { test("should successfully create a new user with a Login ID", async ({
page,
}) => {
await page.goto("/users/new"); await page.goto("/users/new");
// Ensure the page title is loaded // Ensure the page title is loaded
@@ -222,7 +234,9 @@ test.describe("User Management", () => {
await expect(page).toHaveURL(/.*\/users$/, { timeout: 10000 }); await expect(page).toHaveURL(/.*\/users$/, { timeout: 10000 });
}); });
test("should show conflict error when creating with an existing Login ID", async ({ page }) => { test("should show conflict error when creating with an existing Login ID", async ({
page,
}) => {
await page.goto("/users/new"); await page.goto("/users/new");
await expect(page.getByText(/사용자 추가/i).first()).toBeVisible(); await expect(page.getByText(/사용자 추가/i).first()).toBeVisible();
@@ -240,6 +254,8 @@ test.describe("User Management", () => {
await createButton.click(); await createButton.click();
// Check for the specific conflict error message from the backend mock // Check for the specific conflict error message from the backend mock
await expect(page.getByText(/이미 존재하는 로그인 ID 입니다/i)).toBeVisible(); await expect(
page.getByText(/이미 존재하는 로그인 ID 입니다/i),
).toBeVisible();
}); });
}); });