import { createMinAgeActions , createSavePolicyAction , createSnapshotPolicyActions , createTogglePhaseAction , } from '../../helpers' ; import { initTestBed } from '../init_test_bed' ; type SetupReturn = ReturnType < typeof setupDeleteTestBed > ; export type DeleteTestBed = SetupReturn extends Promise < infer U > ? U : SetupReturn ; export const setupDeleteTestBed = async ( ) => { const testBed = await initTestBed ( ) ; const { exists } = testBed ; return { ... testBed , actions : { togglePhase : createTogglePhaseAction ( testBed ) , savePolicy : createSavePolicyAction ( testBed ) , delete : { isShown : ( ) => exists ( 'delete-phase' ) , ... createMinAgeActions ( testBed , 'delete' ) , ... createSnapshotPolicyActions ( testBed ) , } , } , } ; } ;