diff options
author | Alexey Sandler <alexey.sandler@intl.att.com> | 2020-05-06 18:58:14 +0300 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2020-05-17 02:37:48 +0000 |
commit | c8a3cfffe97ec18a54f43e82c3d4f65a65d7eefb (patch) | |
tree | d1c7b25f925609b9457c015465f5f281ad7400de /vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts | |
parent | 4ac68cef7eac5c56d61626000f43d4e8f686c33d (diff) |
Add to VFM context menu action "Add pause upon completion".
Issue-ID: VID-821
Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Change-Id: I8b0ef7021fb7b74e8ad12ae92e581510491d9605
Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts')
-rw-r--r-- | vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts index c225687ea..42ee238d0 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts @@ -20,6 +20,7 @@ import {VfModuleUpgradePopupService} from "../../../../../shared/components/gene import {instance, mock, when} from "ts-mockito"; import each from "jest-each"; import {VfModule} from "../../../../../shared/models/vfModule"; +import {VfModuleTreeNode} from "../../../../../shared/models/vfModuleTreeNode"; class MockAppStore<T> { getState() { @@ -127,6 +128,26 @@ describe('VFModule Model Info', () => { expect(nextLevel).toBeNull(); }); + each([ + ['afterCompletion', 'afterCompletion'], + ['undefined', undefined] + ]). + test('createNode should return pauseInstantiation status %s', (description, pauseInstantiationStatus) => { + const modelName: string = "vfModuleModelName"; + const vfModuleInstance = { + "vfModuleInstanceName": { + "pauseInstantiation": pauseInstantiationStatus, + } + }; + const currentModel = {}; + const parentModel = {}; + const serviceModelId = "serviceModelId"; + + let actual: VfModuleTreeNode = vfModuleModel.createNode(<any>vfModuleInstance, <any>currentModel, <any>parentModel, modelName, 0, serviceModelId); + let expected: string = pauseInstantiationStatus; + expect(actual.pauseInstantiation).toEqual(expected); + }); + test('getModel should return Module model', () => { let model = vfModuleModel.getModel({ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5", |