diff options
Diffstat (limited to 'vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts')
-rw-r--r-- | vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts index 4ca39b185..46e5fad44 100644 --- a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts @@ -105,13 +105,17 @@ describe('View Edit Page: Upgrade VFModule', function () { initServicePlanning("EDIT", '../vid-automation/src/test/resources/viewEdit/ServiceTreeWithMultipleChildren_serviceInstance_withUpdatedLatestVersion.json'); upgradeTheVFM(); + assertVfModuleActionInRedux("None_Upgrade"); undoUpgradeForVFM(); + assertVfModuleActionInRedux("None"); upgradeTheVFM(); cy.getDrawingBoardDeployBtn().click(); cy.wait('@expectedPostAsyncInstantiation').then(xhr => { - expect(Object(xhr.request.body).action).to.equal("None_Upgrade"); - expect(Object(xhr.request.body).vnfs['VNF2_INSTANCE_ID'].action).to.equal("None_Upgrade"); - expect(Object(xhr.request.body).vnfs['VNF2_INSTANCE_ID'].vfModules['vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1']['2c1ca484-cbc2-408b-ab86-25a2c15ce280'].action).to.equal("None_Upgrade"); + const requestBody = Object(xhr.request.body); + const vfModuleRequest = requestBody.vnfs['VNF2_INSTANCE_ID'].vfModules['vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1']['2c1ca484-cbc2-408b-ab86-25a2c15ce280']; + expect(requestBody.action).to.equal("None_Upgrade"); + expect(requestBody.vnfs['VNF2_INSTANCE_ID'].action).to.equal("None_Upgrade"); + expect(vfModuleRequest.action).to.equal("None_Upgrade"); }); }); @@ -213,6 +217,9 @@ describe('View Edit Page: Upgrade VFModule', function () { cy.getElementByDataTestsId(`${treeNodeId}-menu-btn`).click() .drawingBoardTreeClickOnContextMenuOptionByName("Upgrade"); // The following is needed when enabling FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS + + cy.getElementByDataTestsId('retainAssignments').click(); + cy.screenshot(); cy.getElementByDataTestsId('form-set').click(); } @@ -225,4 +232,13 @@ describe('View Edit Page: Upgrade VFModule', function () { serviceModel.service.uuid = "6e59c5de-f052-46fa-aa7e-2fca9d674c44"; return serviceModel; } + + function assertVfModuleActionInRedux(expectedState:string) { + cy.getReduxState().then((state) => { + const vfModule = state.service.serviceInstance['6e59c5de-f052-46fa-aa7e-2fca9d674c44'] + .vnfs["VNF2_INSTANCE_ID"] + .vfModules["vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1"]["2c1ca484-cbc2-408b-ab86-25a2c15ce280"]; + expect(vfModule.action).to.equal(expectedState) + }); + } }); |