aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts34
1 files changed, 27 insertions, 7 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
index f111189fc..9f2499f3c 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['dc229cd8-c132-4455-8517-5c1787c18b14']['3ef042c4-259f-45e0-9aba-0989bd8d1cc5'].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");
});
});
@@ -206,16 +210,23 @@ describe('View Edit Page: Upgrade VFModule', function () {
method: 'GET',
status: 200,
response: {},
- }).as("expectLatestServiceModelUpgradeVersion")
+ }).as("expectLatestServiceModelUpgradeVersion");
}
- function upgradeTheVFM(treeNodeId = 'node-undefined-dc229cd8-c132-4455-8517-5c1787c18b14'): Chainable<any> {
- return cy.getElementByDataTestsId(`${treeNodeId}-menu-btn`).click()
+ function upgradeTheVFM(treeNodeId = 'node-522159d5-d6e0-4c2a-aa44-5a542a12a830-vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1') {
+ 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.getElementByDataTestsId('retainVolumeGroups').click();
+ cy.getElementByDataTestsId('sdncPreLoad').click();
+ cy.screenshot();
+ cy.getElementByDataTestsId('form-set').click();
}
function undoUpgradeForVFM() {
- cy.getElementByDataTestsId('node-undefined-dc229cd8-c132-4455-8517-5c1787c18b14-menu-btn').click()
+ cy.getElementByDataTestsId('node-522159d5-d6e0-4c2a-aa44-5a542a12a830-vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1-menu-btn').click()
.drawingBoardTreeClickOnContextMenuOptionByName("Undo Upgrade");
}
@@ -223,4 +234,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)
+ });
+ }
});