fix(ai-character): 폼 도메인 검증 복구

This commit is contained in:
Yu Sung
2026-08-05 00:34:04 +09:00
parent fb9b550040
commit ca5aa990d3
9 changed files with 290 additions and 14 deletions

View File

@@ -26,7 +26,7 @@ function createInactiveFormClient(requests: CapturedRequest[]): ApiClient {
};
}
test.each(["-1", "1.5", "100000"])("AudioContentFormPage rejects invalid edit price %s before update", async (value) => {
test.each(["-1", "1.5", "100000"])("AudioContentFormPage rejects invalid edit price %s through the submit button", async (value) => {
// Given
const requests: CapturedRequest[] = [];
window.history.pushState({}, "", "/ai-characters/101/audio-contents/9001/edit");
@@ -35,7 +35,7 @@ test.each(["-1", "1.5", "100000"])("AudioContentFormPage rejects invalid edit pr
// When
const priceInput = await screen.findByLabelText("가격");
fireEvent.change(priceInput, { target: { value } });
fireEvent.submit(screen.getByRole("form", { name: "오디오 콘텐츠 수정 입력 화면" }));
fireEvent.click(screen.getByRole("button", { name: "저장" }));
// Then
expect(priceInput).toHaveValue(Number(value));