import React from 'react' ; import { shallow , ShallowWrapper } from 'enzyme' ; import { EuiButton } from '@elastic/eui' ; import { CustomizationCallout } from './customization_callout' ; describe ( 'CustomizationCallout' , ( ) => { let wrapper ; const onClick = jest . fn ( ) ; beforeAll ( ( ) => { wrapper = shallow ( < CustomizationCallout onClick = { onClick } / > ) ; } ) ; it ( 'renders' , ( ) => { expect ( wrapper . isEmptyRender ( ) ) . toBe ( false ) ; } ) ; it ( 'calls onClick param when the Customize button is clicked' , ( ) => { wrapper . find ( EuiButton ) . simulate ( 'click' ) ; expect ( onClick ) . toHaveBeenCalled ( ) ; } ) ; } ) ;