import { AppServicesContext } from '../../../../public/types' ; import { createColdPhaseActions , createDeletePhaseActions , createFormSetValueAction , createFrozenPhaseActions , createHotPhaseActions , createRolloverActions , createSavePolicyAction , createTogglePhaseAction , createWarmPhaseActions , } from '../../helpers' ; import { initTestBed } from '../init_test_bed' ; type SetupReturn = ReturnType < typeof setupSerializationTestBed > ; export type SerializationTestBed = SetupReturn extends Promise < infer U > ? U : SetupReturn ; export const setupSerializationTestBed = async ( arg ? ) => { const testBed = await initTestBed ( arg ) ; return { ... testBed , actions : { togglePhase : createTogglePhaseAction ( testBed ) , savePolicy : createSavePolicyAction ( testBed ) , setPolicyName : createFormSetValueAction ( testBed , 'policyNameField' ) , ... createRolloverActions ( testBed ) , ... createHotPhaseActions ( testBed ) , ... createWarmPhaseActions ( testBed ) , ... createColdPhaseActions ( testBed ) , ... createFrozenPhaseActions ( testBed ) , ... createDeletePhaseActions ( testBed ) , } , } ; } ;