import React from 'react' ; import { shallow } from 'enzyme' ; import { EuiText , EuiTitle } from '@elastic/eui' ; import { ConfigurationIntro } from './configuration_intro' ; describe ( 'ConfigurationIntro' , ( ) => { const advanceStep = jest . fn ( ) ; const props = { header : < h1 > Header < /h1>, name : 'foo' , advanceStep , } ; it ( 'renderscontext' , ( ) => { const wrapper = shallow ( < ConfigurationIntro { ... props } / > ) ; expect ( wrapper . find ( '[data-test-subj="ConfigureStepButton"]' ) ) . toHaveLength ( 1 ) ; expect ( wrapper . find ( EuiText ) ) . toHaveLength ( 3 ) ; expect ( wrapper . find ( EuiTitle ) ) . toHaveLength ( 3 ) ; } ) ; } ) ;