diff options
author | 2019-12-16 13:22:19 +0000 | |
---|---|---|
committer | 2019-12-16 13:22:19 +0000 | |
commit | 31e02ef034fddefe26d48f497462015e7976f0b5 (patch) | |
tree | 9b17b52fddebd998175296aa139df0751409046a /vid-webpack-master/src/app/shared/storeUtil/utils/global/global.reducers.spec.ts | |
parent | f279146ffd395d446a58be75d6786de41b6a9381 (diff) | |
parent | f959829f573644c2b4d5ada940348ec4893d8a8c (diff) |
Merge "When opening new VNF modal the modal should be empty."
Diffstat (limited to 'vid-webpack-master/src/app/shared/storeUtil/utils/global/global.reducers.spec.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/storeUtil/utils/global/global.reducers.spec.ts | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/vid-webpack-master/src/app/shared/storeUtil/utils/global/global.reducers.spec.ts b/vid-webpack-master/src/app/shared/storeUtil/utils/global/global.reducers.spec.ts index c8aecdd57..47b5e09c5 100644 --- a/vid-webpack-master/src/app/shared/storeUtil/utils/global/global.reducers.spec.ts +++ b/vid-webpack-master/src/app/shared/storeUtil/utils/global/global.reducers.spec.ts @@ -7,7 +7,7 @@ import { UpdateGenericModalHelper, DeleteGenericModalHelper, ClearGenericModalHelper, - UpdateGenericModalTableDataHelper + UpdateGenericModalTableDataHelper, UpdateCurrentModalModeAction } from "./global.actions"; import {globalReducer} from "./global.reducers"; @@ -142,6 +142,43 @@ describe('globalReducer', () => { expect(globalDrawingBoardState.genericModalHelper[keyName]).toBeUndefined(); }); + + + test('#UPDATE_CURRENT_MODAL_MODE : should update current modal mode: true', ()=> { + let globalDrawingBoardState = globalReducer(<any>{global : {},genericModalHelper : { + isUpdateModalMode : null + }}, + <UpdateCurrentModalModeAction>{ + type: GlobalActions.UPDATE_CURRENT_MODAL_MODE, + isUpdateModalMode : true + }); + expect(globalDrawingBoardState.isUpdateModalMode).toBeTruthy(); + }); + + + test('#UPDATE_CURRENT_MODAL_MODE : should update current modal mode: false', ()=> { + let globalDrawingBoardState = globalReducer(<any>{global : {},genericModalHelper : { + isUpdateModalMode : true + }}, + <UpdateCurrentModalModeAction>{ + type: GlobalActions.UPDATE_CURRENT_MODAL_MODE, + isUpdateModalMode : false + }); + expect(globalDrawingBoardState.isUpdateModalMode).toBeFalsy(); + }); + + test('#UPDATE_CURRENT_MODAL_MODE : should delete modal mode if value is null', ()=> { + let globalDrawingBoardState = globalReducer(<any>{global : {},genericModalHelper : { + isUpdateModalMode : true + }}, + <UpdateCurrentModalModeAction>{ + type: GlobalActions.UPDATE_CURRENT_MODAL_MODE, + isUpdateModalMode : null + }); + expect(globalDrawingBoardState.isUpdateModalMode).toBeUndefined(); + }); + + }); |