From 182d036de5a7d64250fc5058f3cf361b9d823282 Mon Sep 17 00:00:00 2001 From: Rachitha Ramappa Date: Wed, 11 Nov 2020 17:38:58 +0530 Subject: removing retain assignments checkbox from upgade vfModule screen Change-Id: I7f28de1ebc34ae393828bf139716533248e8897a Issue-ID: VID-922 Signed-off-by: rachitha.ramappa@att.com --- .../vfModuleUpgrade/vfModule.upgrade.popuop.service.ts | 13 +------------ .../vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts | 9 +++------ 2 files changed, 4 insertions(+), 18 deletions(-) (limited to 'vid-webpack-master/src/app/shared/components') diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts index afc099c1e..60d981cba 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts @@ -44,7 +44,6 @@ export class VfModuleUpgradePopupService extends VfModulePopupServiceBase { getControls(serviceId: string, vnfStoreKey: string, vfModuleStoreKey: string, isUpdateMode: boolean): FormControlModel[] { let result: FormControlModel[] =[ - this.getRetainAssignmentsControl(), this._sharedControllersService.getSDNCControl(null, true) ]; @@ -70,6 +69,7 @@ export class VfModuleUpgradePopupService extends VfModulePopupServiceBase { this.updateFormValueWithSupplementaryFile(form, that); +form.value[UpgradeFormControlNames.RETAIN_ASSIGNMENTS] = false; this._store.dispatch(upgradeVFModule(modelName, vnfStoreKey, serviceInstanceId, dynamicModelName)); this._store.dispatch(mergeObjectByPathAction(['serviceInstance', serviceInstanceId, 'vnfs', vnfStoreKey, 'vfModules', modelName, dynamicModelName], form.value)); this._sharedTreeService.upgradeBottomUp(node, serviceInstanceId); @@ -88,15 +88,4 @@ export class VfModuleUpgradePopupService extends VfModulePopupServiceBase { validations: [] }) }; - - getRetainAssignmentsControl = (): CheckboxFormControl => { - return new CheckboxFormControl({ - type: FormControlType.CHECKBOX, - controlName: UpgradeFormControlNames.RETAIN_ASSIGNMENTS, - displayName: 'Retain Assignments', - dataTestId: UpgradeFormControlNames.RETAIN_ASSIGNMENTS, - value: false, - validations: [] - }) - }; } diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts index 86ec66652..988e2a7c2 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts @@ -133,10 +133,6 @@ describe('VFModule popup service', () => { } } - test('get controls should return retainAssignments control with false', ()=> { - getControlByNameAndCheckValue(UpgradeFormControlNames.RETAIN_ASSIGNMENTS, false, true); - }); - test('get controls should return retainVolumeGroup control with false', ()=> { getControlByNameAndCheckValue(UpgradeFormControlNames.RETAIN_VOLUME_GROUPS, false, true); }); @@ -209,12 +205,13 @@ describe('VFModule popup service', () => { } } }; - +form.value['retainAssignments'] = false; let expectedMergePayload = { a: "value", b: "another", supplementaryFileContent: [{"name": "c", "value": "c"}, {"name": "d", "value": "1"}], - supplementaryFileName: "name" + supplementaryFileName: "name", + retainAssignments: false }; spyOn(store, 'dispatch'); -- cgit 1.2.3-korg