feat(ai-character): 댓글 액션 버튼 라벨 간소화

This commit is contained in:
Yu Sung
2026-08-06 18:51:55 +09:00
parent 46868351ac
commit 68959cb33b
5 changed files with 475 additions and 8 deletions

View File

@@ -106,14 +106,16 @@ test("Community sheet comments keep two-level controls usable at 320px", async (
await expect(dialog.getByRole("heading", { name: "댓글 관리" })).toBeVisible();
await expect(dialog.getByLabel("새 댓글")).toBeInViewport();
await expect(dialog.getByText("커뮤니티 팬 루트 댓글", { exact: true })).toBeVisible();
await expect(dialog.getByRole("button", { name: "커뮤니티 AI 루트 댓글 답글 작성" })).toBeVisible();
const writeReply = dialog.getByRole("button", { name: "커뮤니티 AI 루트 댓글 답글 작성" });
await expect(writeReply).toBeVisible();
await expect(writeReply).toHaveText("답글 작성");
await expectNoHorizontalOverflow(page);
// When
await dialog.getByLabel("새 댓글").fill("커뮤니티 루트 생성");
await dialog.getByRole("button", { name: "댓글 등록" }).click();
await expect(dialog.getByText("커뮤니티 루트 생성", { exact: true })).toBeVisible();
await dialog.getByRole("button", { name: "커뮤니티 AI 루트 댓글 답글 작성" }).click();
await writeReply.click();
const emptyReplies = dialog.getByRole("region", { name: "커뮤니티 AI 루트 댓글 답글" });
const emptyReplyInput = emptyReplies.getByLabel("커뮤니티 AI 루트 댓글에 답글");
await expect(emptyReplyInput).toBeVisible();
@@ -143,6 +145,7 @@ test("Community sheet comments keep two-level controls usable at 320px", async (
await expect(emptyReplies.getByRole("button", { name: /^(커뮤니티 첫 답글 생성|커뮤니티 두 번째 답글 생성) 답글 (작성|보기)$/ })).toHaveCount(0);
const showReplies = dialog.getByRole("button", { name: "커뮤니티 팬 루트 댓글 답글 보기" });
await expect(showReplies).toBeEnabled();
await expect(showReplies).toHaveText("답글 보기");
await showReplies.click();
const replies = dialog.getByRole("region", { name: "커뮤니티 팬 루트 댓글 답글" });
await expect(replies).toBeVisible();
@@ -150,11 +153,15 @@ test("Community sheet comments keep two-level controls usable at 320px", async (
await expect(replies.getByRole("button", { name: /^커뮤니티 AI 답글 답글 (작성|보기)$/ })).toHaveCount(0);
await replies.getByLabel("커뮤니티 팬 루트 댓글에 답글").fill("커뮤니티 답글 생성");
await replies.getByRole("button", { name: "답글 등록" }).click();
await replies.getByRole("button", { name: "커뮤니티 AI 답글 수정" }).click();
const editReply = replies.getByRole("button", { name: "커뮤니티 AI 답글 수정" });
await expect(editReply).toHaveText("수정");
await editReply.click();
await replies.getByLabel("댓글 수정 내용").fill("커뮤니티 AI 답글 수정");
await replies.getByRole("button", { name: "수정 저장" }).click();
await expect.poll(() => replies.getByRole("button", { name: "커뮤니티 팬 답글 삭제" }).isEnabled()).toBe(true);
await replies.getByRole("button", { name: "커뮤니티 팬 답글 삭제" }).click();
const deleteReply = replies.getByRole("button", { name: "커뮤니티 팬 답글 삭제" });
await expect(deleteReply).toHaveText("삭제");
await expect.poll(() => deleteReply.isEnabled()).toBe(true);
await deleteReply.click();
// Then
await expect(replies.getByText("커뮤니티 팬 답글", { exact: true })).toBeHidden();