import { TestBed } from '@kbn/test/jest' ; import { Phase } from '../../../../common/types' ; import { createFormToggleAction } from './form_toggle_action' ; import { createFormToggleAndSetValueAction } from './form_toggle_and_set_value_action' ; export const createIndexPriorityActions = ( testBed , phase ) => { const { exists } = testBed ; const toggleSelector = `${ phase }-indexPrioritySwitch` ; return { indexPriorityExists : ( ) => exists ( toggleSelector ) , toggleIndexPriority : createFormToggleAction ( testBed , toggleSelector ) , setIndexPriority : createFormToggleAndSetValueAction ( testBed , toggleSelector , `${ phase }-indexPriority` ) , } ; } ;