import React from 'react' ; import { render } from '@testing-library/react' ; import { StepCreateForm , StepCreateFormProps } from './step_create_form' ; jest . mock ( '../../../../../shared_imports' ) ; jest . mock ( '../../../../../app/app_dependencies' ) ; describe ( 'Transform: <StepCreateForm />' , ( ) => { test ( 'Minimal initialization' , ( ) => { const props = { createIndexPattern : false , transformId : 'the-transform-id' , transformConfig : { dest : { index : 'the-destination-index' , } , pivot : { group_by : { } , aggregations : { } , } , source : { index : 'the-source-index' , } , } , overrides : { created : false , started : false , indexPatternId : undefined } , onChange ( ) { } , } ; const { getByText } = render ( < StepCreateForm { ... props } / > ) ; expect ( getByText ( 'Create and start' ) ) . toBeInTheDocument ( ) ; } ) ; } ) ;