@@ -1,45 +0,0 @@
|
||||
import { describe, expect, it, vi } from "vitest"
|
||||
import { render } from "@testing-library/react"
|
||||
import TimelinePanel from "@/pages/editing-planner/components/TimelinePanel"
|
||||
|
||||
const mockClips = [
|
||||
{ id: "clip-1", type: "voice", duration: 10, startOffset: 0 } as any,
|
||||
{ id: "clip-2", type: "pip", duration: 5, startOffset: 0 } as any,
|
||||
{ id: "clip-3", type: "voice", duration: 15, startOffset: 0 } as any,
|
||||
]
|
||||
|
||||
const defaultProps = {
|
||||
clips: mockClips,
|
||||
selectedClipId: "clip-1",
|
||||
currentMode: "template",
|
||||
onClipSelect: vi.fn(),
|
||||
onClipReorder: vi.fn(),
|
||||
onClipRemove: vi.fn(),
|
||||
onAddClip: vi.fn(),
|
||||
onClipTrim: vi.fn(),
|
||||
onClipSplit: vi.fn(),
|
||||
onClipResetTrim: vi.fn(),
|
||||
currentTime: 0,
|
||||
pixelsPerSecond: 30,
|
||||
onZoomChange: vi.fn(),
|
||||
onSeek: vi.fn(),
|
||||
}
|
||||
|
||||
describe("TimelinePanel", () => {
|
||||
it("should render with clips", () => {
|
||||
const { container } = render(<TimelinePanel {...defaultProps} />)
|
||||
expect(container).toBeTruthy()
|
||||
})
|
||||
|
||||
it("should render with empty clips", () => {
|
||||
const { container } = render(
|
||||
<TimelinePanel {...defaultProps} clips={[]} selectedClipId={null} />,
|
||||
)
|
||||
expect(container).toBeTruthy()
|
||||
})
|
||||
|
||||
it("should render without selected clip", () => {
|
||||
const { container } = render(<TimelinePanel {...defaultProps} selectedClipId={null} />)
|
||||
expect(container).toBeTruthy()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user