diff options
author | Eylon Malin <eylon.malin@intl.att.com> | 2020-01-16 14:54:41 +0200 |
---|---|---|
committer | Eylon Malin <eylon.malin@intl.att.com> | 2020-01-19 12:23:47 +0200 |
commit | 284de1d0f9e93bf661bbca4074b6531d6d5385c1 (patch) | |
tree | eebeaced5cfdac5d3a17ced8b2f3f03f40c36ae8 /vid-webpack-master/cypress/integration | |
parent | adef7f90d338e0e93e3a3d0a6f714f0270a9b7f1 (diff) |
originalName stored and sent to frontend in a template
Issue-ID: VID-724
Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Change-Id: Ie18e16fed62f9a92a4b4d5c72596c36303de1f48
Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Diffstat (limited to 'vid-webpack-master/cypress/integration')
-rw-r--r-- | vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts index 40306fcfd..d1bee9c70 100644 --- a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts @@ -37,6 +37,7 @@ describe('Drawing Board: Instantiation Templates', function () { loadDrawingBoardWithRecreateMode(); removeVNFWithVFModules('node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0'); + removeVNFWithVFModules('node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0'); cy.getDrawingBoardDeployBtn().click(); cy.wait('@expectedPostAsyncInstantiation').then(xhr => { @@ -52,7 +53,7 @@ describe('Drawing Board: Instantiation Templates', function () { .fillVnfPopup() .getDrawingBoardDeployBtn().click() .wait('@expectedPostAsyncInstantiation').then(xhr => { - const vnfRequest = bodyOf(xhr).vnfs['vProbe_NC_VNF 0_1']; + const vnfRequest = bodyOf(xhr).vnfs['vProbe_NC_VNF 0_2']; expect(vnfRequest.action).equals("Create"); expect(vnfRequest.rollbackOnFailure).equals("true"); @@ -82,7 +83,7 @@ describe('Drawing Board: Instantiation Templates', function () { .getTagElementContainsText('button', 'Duplicate').click() .getDrawingBoardDeployBtn().click() .wait('@expectedPostAsyncInstantiation').then(xhr => { - expect(Object.keys(bodyOf(xhr).vnfs).length).equals(numberOfDuplicate + 1); + expect(Object.keys(bodyOf(xhr).vnfs).length).equals(numberOfDuplicate + 2); }); }); @@ -119,6 +120,7 @@ describe('Drawing Board: Instantiation Templates', function () { assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd([ {path: [...vnfPath, "vnfStoreKey"], value: "vProbe_NC_VNF 0"}, // side-effect + {path: [...vnfPath2, "vnfStoreKey"], value: "vProbe_NC_VNF 0_1"}, ]); }); @@ -145,7 +147,7 @@ describe('Drawing Board: Instantiation Templates', function () { let module1CustomizationId = `vprobe_nc_vnf0..${module1ModelId}`; // Click target VNF on right tree - cy.getElementByDataTestsId('node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0').click(); + cy.getElementByDataTestsId('node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0').first().click(); // Click [+] vfModule on left tree cy.drawingBoardPressAddButtonByElementName(`node-${module1CustomizationId}`) @@ -182,6 +184,7 @@ describe('Drawing Board: Instantiation Templates', function () { assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd([ {path: [...vnfPath, "vnfStoreKey"], value: "vProbe_NC_VNF 0"}, // side-effect + {path: [...vnfPath2, "vnfStoreKey"], value: "vProbe_NC_VNF 0_1"}, {path: ["existingNames", newVfModuleName], value: ""}, {path: ["existingNames", `${newVfModuleName}_vol`], value: ""}, {path: latestVfModule_1Path, value: latestVfModule_1ExpectedValue}, @@ -202,6 +205,7 @@ describe('Drawing Board: Instantiation Templates', function () { assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd([ {path: [...vnfPath, "vnfStoreKey"], value: "vProbe_NC_VNF 0"}, // side-effect + {path: [...vnfPath2, "vnfStoreKey"], value: "vProbe_NC_VNF 0_1"}, {path: [...removed_vfModule_Path], value: undefined}, ]); }); @@ -333,6 +337,10 @@ const vnfPath = [ "vnfs", "vProbe_NC_VNF 0" ]; +const vnfPath2 = [ + "vnfs", "vProbe_NC_VNF 0_1" +]; + function loadDrawingBoardWithRecreateMode() { loadDrawingBoardWithRecreateModeInternal( '../../' + templateWithVnfSetup.instanceTemplateFile, |