diff options
author | ikram <ikram@research.att.com> | 2020-07-15 17:45:37 -0400 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2020-07-20 10:37:59 +0300 |
commit | 6cb5548d03e0aaf044a46d2edd2912647e01d23e (patch) | |
tree | 79573979fdd6b0baa2d9abe01abf9014a9aea14e /vid-webpack-master | |
parent | d50f96bf6dc183b49c2a5d4e7d729066ac129527 (diff) |
Add Pause Functionality from Inside VF Module's Edit Dialog
Issue-ID: VID-858
Allow user to choose adding (and removing) Pause points from within the Edit Dialog of the VF Module. Currently, the support of adding is only from the vertical ellipsis menu. Also, there is currently no option of removing the pause point. This functionality will allow this to happen as well since inside the Edit dialog, the option is a checkbox which can now unchecked. Note: removing the pause point from within the vertical ellipse after being added will be covered in a separate user story. However, the desired functionality can still be reached using this commit as describe above.
Signed-off-by: ikram <ikram@research.att.com>
Change-Id: Ife22df1ce5f7891b595b78cb30cbf82948fae744
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master')
4 files changed, 15 insertions, 6 deletions
diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json index 9c597c513..b956f747c 100644 --- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json +++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json @@ -28,5 +28,6 @@ "FLAG_2006_NETWORK_PLATFORM_MULTI_SELECT" :true, "FLAG_2006_NETWORK_LOB_MULTI_SELECT" : true, "FLAG_2006_NEW_VIEW_EDIT_BUTTON_IN_INSTANTIATION_STATUS" : true, - "FLAG_2006_PAUSE_VFMODULE_INSTANTIATION_CREATION" : true + "FLAG_2006_PAUSE_VFMODULE_INSTANTIATION_CREATION" : true, + "FLAG_2008_PAUSE_INSTANTIATION_ON_VFMODULE_POPUP" : true } diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts index bbfde30d8..7cd8b2e2f 100644 --- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts @@ -1080,11 +1080,14 @@ describe('VFModule Control Generator', () => { }); each([ - [true, 5, formControlsWithoutLcpRegionTenantLegacy], - [false, 8,formControlsWithLcpRegionTenantLegacy] + [true, true, 5, formControlsWithoutLcpRegionTenantLegacy], + [false, true, 8, formControlsWithLcpRegionTenantLegacy], + [true, false, 4, formControlsWithoutLcpRegionTenantLegacy], + [false, false, 7, formControlsWithLcpRegionTenantLegacy], ]). - test('getAlaCarteFormControls should return the correct order of controls', (flag: boolean, controlAmount: number, orderedControls: string[]) => { - when(mockFeatureFlagsService.getFlagState(Features.FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF)).thenReturn(flag); + test('getAlaCarteFormControls should return the correct order of controls', (tenantControls: boolean, pauseControl: boolean, controlAmount: number, orderedControls: string[]) => { + when(mockFeatureFlagsService.getFlagState(Features.FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF)).thenReturn(tenantControls); + when(mockFeatureFlagsService.getFlagState(Features.FLAG_2008_PAUSE_INSTANTIATION_ON_VFMODULE_POPUP)).thenReturn(pauseControl); const controls:FormControlModel[] = getAlaCarteFormControls(); expect(controls.length).toEqual(controlAmount); diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.ts index 8c6af89da..2deb5d9a4 100644 --- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.ts +++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.ts @@ -133,7 +133,11 @@ export class VfModuleControlGenerator { } result.push(this._sharedControllersService.getRollbackOnFailureControl(vfModuleInstance)); result.push(this._sharedControllersService.getSDNCControl(vfModuleInstance, false, this.getSdncExtraContents())); - result.push(this._sharedControllersService.getPauseInstantiation(vfModuleInstance)); + + if(this._featureFlagsService.getFlagState(Features.FLAG_2008_PAUSE_INSTANTIATION_ON_VFMODULE_POPUP)){ + console.log(Features.FLAG_2008_PAUSE_INSTANTIATION_ON_VFMODULE_POPUP); + result.push(this._sharedControllersService.getPauseInstantiation(vfModuleInstance)); + } if (this.store.getState().global.flags['FLAG_SUPPLEMENTARY_FILE']) { result = this._basicControlGenerator.concatSupplementaryFile(result, vfModuleInstance); } diff --git a/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts b/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts index 50840d194..9926d6c67 100644 --- a/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts +++ b/vid-webpack-master/src/app/shared/services/featureFlag/feature-flags.service.ts @@ -23,6 +23,7 @@ export enum Features { FLAG_2006_VNF_LOB_MULTI_SELECT= 'FLAG_2006_VNF_LOB_MULTI_SELECT', FLAG_2006_NEW_VIEW_EDIT_BUTTON_IN_INSTANTIATION_STATUS= 'FLAG_2006_NEW_VIEW_EDIT_BUTTON_IN_INSTANTIATION_STATUS', FLAG_2006_PAUSE_VFMODULE_INSTANTIATION_CREATION = 'FLAG_2006_PAUSE_VFMODULE_INSTANTIATION_CREATION', + FLAG_2008_PAUSE_INSTANTIATION_ON_VFMODULE_POPUP = 'FLAG_2008_PAUSE_INSTANTIATION_ON_VFMODULE_POPUP', } @Injectable() |