UNPKG

@zohodesk/dot

Version:

In this Library, we Provide Some Basic Components to Build Your Application

64 lines 2.24 kB
import React from 'react'; import { render } from '@testing-library/react'; import CarouselDots from "../CarouselDots"; describe('CarouselDots', () => { const sliderData = [{ imageSource: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ3Mu0NdfXXqvCExZ9YG_j93CKuU4DIdcIlEQ&s", tabName: 'commentPin', heading: "Onboarding with carousel Slide 1", description: "Discover innovative tools and solutions to streamline your processes and boost productivity on Slide 1." }, { imageSource: "https://crm-masters.com/wp-content/uploads/2023/05/cover-images-1200-%C3%97-630px-39-1-1200x675.jpg", tabName: 'visibility', heading: "Slide 2", description: "Immerse yourself in a visually stunning experience on Slide 2, where innovative ideas and compelling visuals spark curiosity and inspiration." }]; test('rendering the defult props', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(CarouselDots, null)); expect(asFragment()).toMatchSnapshot(); }); test('rendering of slider data', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(CarouselDots, { sliderDetails: sliderData })); expect(asFragment()).toMatchSnapshot(); }); test('rendering prop of currentSliderIndex', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(CarouselDots, { sliderDetails: sliderData, currentSliderIndex: 1 })); expect(asFragment()).toMatchSnapshot(); }); test('rendering prop of isAnimationPaused', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(CarouselDots, { sliderDetails: sliderData, isAnimationPaused: true })); expect(asFragment()).toMatchSnapshot(); }); test('rendering with customId', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(CarouselDots, { customId: "radar" })); expect(asFragment()).toMatchSnapshot(); }); test('rendering with testId', () => { const { asFragment } = render( /*#__PURE__*/React.createElement(CarouselDots, { testId: "radar_test" })); expect(asFragment()).toMatchSnapshot(); }); });