From 36367a58bc12e2593744205fd3ffbcc1ac0bcf71 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Thu, 30 Jul 2026 08:53:39 +0800 Subject: [PATCH] test(clone-modal): add smoke test for InputView --- .../voice/clone-modal/InputView.test.tsx | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 apps/web/src/test/components/voice/clone-modal/InputView.test.tsx diff --git a/apps/web/src/test/components/voice/clone-modal/InputView.test.tsx b/apps/web/src/test/components/voice/clone-modal/InputView.test.tsx new file mode 100644 index 000000000..cac3f9316 --- /dev/null +++ b/apps/web/src/test/components/voice/clone-modal/InputView.test.tsx @@ -0,0 +1,28 @@ +import { describe, expect, it, vi } from "vitest" +import { render } from "@testing-library/react" +import InputView from "@/components/voice/clone-modal/InputView" + +vi.mock("@ant-design/icons", () => ({ + AudioOutlined: () => null, + UploadOutlined: () => null, + CheckOutlined: () => null, + CloseOutlined: () => null, + PlayCircleOutlined: () => null, + PauseCircleOutlined: () => null, + DeleteOutlined: () => null, + InfoCircleOutlined: () => null, +})) + +vi.mock("antd", () => ({ + Button: ({ children }: any) => null, + Input: () => null, + Progress: () => null, + message: { success: vi.fn(), error: vi.fn(), warning: vi.fn() }, +})) + +describe("InputView", () => { + it("renders without crashing", () => { + const { container } = render() + expect(container).toBeTruthy() + }) +})