import { TestBed } from '@kbn/test/jest' ; import { Phase } from '../../../../common/types' ; import { createFormToggleAction } from './form_toggle_action' ; export const createReadonlyActions = ( testBed , phase ) => { const { exists } = testBed ; const toggleSelector = `${ phase }-readonlySwitch` ; return { readonlyExists : ( ) => exists ( toggleSelector ) , toggleReadonly : createFormToggleAction ( testBed , toggleSelector ) , } ; } ;