280db0b862
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m19s
CI/CD Pipeline / Frontend Lint (push) Successful in 4m24s
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 4m48s
CI/CD Pipeline / Unit Tests (push) Successful in 5m28s
CI/CD Pipeline / Integration Tests (push) Successful in 1m34s
CI Build & Deploy Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 53s
CI Build & Deploy Pipeline / Build Staging API Image (push) Successful in 6m43s
CI Build & Deploy Pipeline / Build Staging Web Image (push) Successful in 1m48s
CI Build & Deploy Pipeline / Build Staging Worker Image (push) Successful in 8m36s
CI Build & Deploy Pipeline / Build Production API Image (push) Has been skipped
CI Build & Deploy Pipeline / Build Production Web Image (push) Has been skipped
CI Build & Deploy Pipeline / Build Production Worker Image (push) Has been skipped
CI Build & Deploy Pipeline / Deploy Production (push) Has been skipped
CI Build & Deploy Pipeline / Production Browser E2E (push) Has been skipped
CI Build & Deploy Pipeline / Staging E2E Tests (push) Failing after 1m14s
CI Build & Deploy Pipeline / Staging API Integration Tests (push) Successful in 3m3s
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com> Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
25 lines
739 B
TypeScript
25 lines
739 B
TypeScript
import { describe, expect, it, vi } from "vitest"
|
|
import { render } from "@testing-library/react"
|
|
import CoverSelector from "@/pages/editing-planner/components/CoverSelector"
|
|
import { DEFAULT_COVER_CONFIG } from "@/pages/editing-planner/types"
|
|
|
|
const defaultProps = {
|
|
open: true,
|
|
onClose: vi.fn(),
|
|
config: DEFAULT_COVER_CONFIG,
|
|
onChange: vi.fn(),
|
|
totalDuration: 60,
|
|
}
|
|
|
|
describe("CoverSelector", () => {
|
|
it("should render without crashing", () => {
|
|
const { container } = render(<CoverSelector {...defaultProps} />)
|
|
expect(container).toBeTruthy()
|
|
})
|
|
|
|
it("should render when closed", () => {
|
|
const { container } = render(<CoverSelector {...defaultProps} open={false} />)
|
|
expect(container).toBeTruthy()
|
|
})
|
|
})
|