import { TestBed } from '@kbn/test/jest' ; import { createFormToggleAction } from './form_toggle_action' ; import { createFormSetValueAction } from './form_set_value_action' ; export const createFormToggleAndSetValueAction = ( testBed , toggleSelector , inputSelector ) => async ( value ) => { const { exists } = testBed ; if ( ! exists ( inputSelector ) ) { await createFormToggleAction ( testBed , toggleSelector ) ( ) ; } await createFormSetValueAction ( testBed , inputSelector ) ( value ) ; } ;