From 589fa828e0a70eea093ccaffe8d745b4c29b7093 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Thu, 30 Jul 2026 08:49:42 +0800 Subject: [PATCH] test(timeline): add smoke test for ClipCard --- .../components/timeline/ClipCard.test.tsx | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 apps/web/src/test/pages/editing-planner/components/timeline/ClipCard.test.tsx diff --git a/apps/web/src/test/pages/editing-planner/components/timeline/ClipCard.test.tsx b/apps/web/src/test/pages/editing-planner/components/timeline/ClipCard.test.tsx new file mode 100644 index 000000000..8f1533b60 --- /dev/null +++ b/apps/web/src/test/pages/editing-planner/components/timeline/ClipCard.test.tsx @@ -0,0 +1,37 @@ +import { describe, expect, it, vi } from "vitest" +import { render } from "@testing-library/react" +import { ClipCard } from "@/pages/editing-planner/components/timeline/ClipCard" + +vi.mock("@ant-design/icons", () => ({ + AudioOutlined: () => null, + VideoCameraOutlined: () => null, + PictureOutlined: () => null, + FontColorsOutlined: () => null, + MusicOutlined: () => null, + ScissorOutlined: () => null, +})) + +const mockClip = { + id: "clip-1", + type: "voice", + duration: 10, + startOffset: 0, +} as any + +describe("ClipCard", () => { + it("renders without crashing", () => { + const { container } = render( + , + ) + expect(container).toBeTruthy() + }) +})