From 590738f18aadaa0702ac4ead739eb1147730b16c Mon Sep 17 00:00:00 2001 From: Eylon Malin Date: Mon, 25 Nov 2019 14:07:15 +0200 Subject: assert vfModule action after undo upgrade Issue-ID: VID-603 Signed-off-by: Eylon Malin Change-Id: I58a30738793f25fd4f0d8efb48f13fed510d895d --- .../integration/iFrames/viewEditUpgradeVfModule.e2e.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'vid-webpack-master/cypress') diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts index 4ca39b185..9eaa7095e 100644 --- a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts @@ -105,7 +105,9 @@ 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 => { @@ -225,4 +227,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) + }); + } }); -- cgit 1.2.3-korg