import React from 'react' ; import { shallow } from 'enzyme' ; import { EuiTitle , EuiLink , EuiButton , EuiText } from '@elastic/eui' ; import { RoleMappingsHeading } from './role_mappings_heading' ; describe ( 'RoleMappingsHeading' , ( ) => { it ( 'renders ' , ( ) => { const wrapper = shallow ( < RoleMappingsHeading docsLink = "http://elastic.co" productName = "App Search" onClick = { jest . fn ( ) } / > ) ; expect ( wrapper . find ( EuiTitle ) ) . toHaveLength ( 1 ) ; expect ( wrapper . find ( EuiText ) ) . toHaveLength ( 1 ) ; expect ( wrapper . find ( EuiLink ) ) . toHaveLength ( 1 ) ; expect ( wrapper . find ( EuiButton ) ) . toHaveLength ( 1 ) ; } ) ; } ) ;