feat(ai-character): 커뮤니티 생성 미디어 흐름 개선

This commit is contained in:
Yu Sung
2026-08-05 00:33:49 +09:00
parent 766a06ad0a
commit fb9b550040
22 changed files with 700 additions and 141 deletions

View File

@@ -67,10 +67,10 @@ test("AudioContentFormPage commits tag chips with Enter and comma without submit
});
test.each([
{ value: "-1", expected: "0" },
{ value: "1.5", expected: "15" },
{ value: "100000", expected: "100000" },
])("AudioContentFormPage keeps only digits in the price input for $value", async ({ value, expected }) => {
"-1",
"1.5",
"100000",
])("AudioContentFormPage preserves the raw price input %s", async (value) => {
// Given
renderCreateForm();
const priceInput = await screen.findByLabelText("가격");
@@ -83,7 +83,7 @@ test.each([
fireEvent.change(priceInput, { target: { value } });
// Then
expect(priceInput).toHaveValue(Number(expected));
expect(priceInput).toHaveValue(Number(value));
});
test("AudioContentFormPage shows paid options only for a positive price", async () => {
@@ -110,7 +110,7 @@ test("AudioContentFormPage shows paid options only for a positive price", async
expect(screen.getByLabelText("포인트 사용")).toBeInTheDocument();
});
test("AudioContentFormPage resets paid settings and retains removed-control defaults when price returns to zero", async () => {
test("AudioContentFormPage resets paid settings and retains removed-control defaults when price is numeric zero", async () => {
// Given
const uploadedBodies: XMLHttpRequestBodyInit[] = [];
renderCreateForm(uploadedBodies);
@@ -124,7 +124,7 @@ test("AudioContentFormPage resets paid settings and retains removed-control defa
fireEvent.change(screen.getByLabelText("미리듣기 종료"), { target: { value: "01:00:05" } });
// When
fireEvent.change(priceInput, { target: { value: "0" } });
fireEvent.change(priceInput, { target: { value: "00" } });
// Then
expect(screen.queryByRole("group", { name: "구매 옵션" })).not.toBeInTheDocument();