feat(ai-character): 오디오 댓글 첫 답글 작성 지원

This commit is contained in:
Yu Sung
2026-08-05 18:53:41 +09:00
parent 9e2c910f0a
commit e82e209300
8 changed files with 822 additions and 3 deletions

View File

@@ -52,6 +52,13 @@ test("Audio comments create reply edit AI rows and delete fan or AI rows through
// When
await page.getByLabel("새 댓글").fill("오디오 루트 생성");
await page.getByRole("button", { name: "댓글 등록" }).click();
await page.getByRole("button", { name: "오디오 AI 루트 댓글 답글 작성" }).click();
const emptyReplies = page.getByRole("region", { name: "오디오 AI 루트 댓글 답글" });
await expect(emptyReplies.getByLabel("오디오 AI 루트 댓글에 답글")).toBeVisible();
await expect(emptyReplies.getByText("오디오 팬 루트 댓글", { exact: true })).toHaveCount(0);
await emptyReplies.getByLabel("오디오 AI 루트 댓글에 답글").fill("오디오 첫 답글 생성");
await emptyReplies.getByRole("button", { name: "답글 등록" }).click();
await expect(emptyReplies.getByText("오디오 첫 답글 생성", { exact: true })).toBeVisible();
await page.getByRole("button", { name: "오디오 팬 루트 댓글 답글 보기" }).click();
const replies = page.getByRole("region", { name: "오디오 팬 루트 댓글 답글" });
await replies.getByLabel("오디오 팬 루트 댓글에 답글").fill("오디오 답글 생성");
@@ -70,6 +77,7 @@ test("Audio comments create reply edit AI rows and delete fan or AI rows through
await expect(page.getByText("오디오 AI 루트 댓글", { exact: true })).toBeHidden();
await expect(replies.getByText("오디오 답글 생성", { exact: true })).toBeVisible();
expect(commentRequests).toContainEqual({ body: JSON.stringify({ comment: "오디오 루트 생성", parentId: null, isSecret: false, languageCode: null }), method: "POST", path: "/api/v2/admin/ai-characters/101/audio-contents/9001/comments", search: "" });
expect(commentRequests).toContainEqual({ body: JSON.stringify({ comment: "오디오 첫 답글 생성", parentId: 1102, isSecret: false, languageCode: null }), method: "POST", path: "/api/v2/admin/ai-characters/101/audio-contents/9001/comments", search: "" });
expect(commentRequests).toContainEqual({ body: JSON.stringify({ comment: "오디오 답글 생성", parentId: 1101, isSecret: false, languageCode: null }), method: "POST", path: "/api/v2/admin/ai-characters/101/audio-contents/9001/comments", search: "" });
expect(commentRequests).toContainEqual({ body: JSON.stringify({ comment: "오디오 AI 답글 수정" }), method: "PUT", path: "/api/v2/admin/ai-characters/101/audio-contents/9001/comments/1202", search: "" });
expect(commentRequests).toContainEqual({ body: null, method: "DELETE", path: "/api/v2/admin/ai-characters/101/audio-contents/9001/comments/1201", search: "" });
@@ -91,6 +99,7 @@ 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 루트 댓글 답글 작성" })).toHaveCount(0);
await expectNoHorizontalOverflow(page);
// When
@@ -123,6 +132,7 @@ test("keyboard-only Audio comment flow reaches form and reply controls", async (
await loginThroughMockMode(page);
await page.goto("/ai-characters/101/audio-contents/9001");
const rootInput = page.getByLabel("새 댓글");
const firstReplyAction = page.getByRole("button", { name: "오디오 AI 루트 댓글 답글 작성" });
// When / Then
await pressTabUntilFocused(page, rootInput);
@@ -130,4 +140,7 @@ test("keyboard-only Audio comment flow reaches form and reply controls", async (
await pressTabUntilFocused(page, page.getByRole("button", { name: "댓글 등록" }));
await page.keyboard.press("Enter");
await expect(page.getByText("키보드 루트 댓글", { exact: true })).toBeVisible();
await pressTabUntilFocused(page, firstReplyAction);
await page.keyboard.press("Enter");
await pressTabUntilFocused(page, page.getByRole("region", { name: "오디오 AI 루트 댓글 답글" }).getByLabel("오디오 AI 루트 댓글에 답글"));
});