import { mount , shallow } from "enzyme" ; import * as React from "react" ; import { LoadingSpinner } from "../../core-react" ; import { SpinnerSize } from "../../core-react/loading/Spinner" ; describe ( "<LoadingSpinner />" , ( ) => { it ( "should render" , ( ) => { const wrapper = mount ( < LoadingSpinner />); wrapper . unmount ( ) ; } ) ; it ( "renders correctly" , ( ) => { shallow ( < LoadingSpinner />).should.matchSnapshot(); } ) ; it ( "renders with message correctly" , ( ) => { shallow ( < LoadingSpinner message = "test" / > ) . should . matchSnapshot ( ) ; } ) ; it ( "renders with message and position correctly" , ( ) => { shallow ( < LoadingSpinner message = "test" messageOnTop = { true } / > ) . should . matchSnapshot ( ) ; } ) ; it ( "renders with Small size correctly" , ( ) => { shallow ( < LoadingSpinner size = { SpinnerSize . Small } / > ) . should . matchSnapshot ( ) ; } ) ; it ( "renders with Medium size correctly" , ( ) => { shallow ( < LoadingSpinner size = { SpinnerSize . Medium } / > ) . should . matchSnapshot ( ) ; } ) ; it ( "renders with Large size correctly" , ( ) => { shallow ( < LoadingSpinner size = { SpinnerSize . Large } / > ) . should . matchSnapshot ( ) ; } ) ; it ( "renders with XLarge size correctly" , ( ) => { shallow ( < LoadingSpinner size = { SpinnerSize . XLarge } / > ) . should . matchSnapshot ( ) ; } ) ; } ) ;