aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts54
1 files changed, 54 insertions, 0 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 1da12a55d..5afcc9748 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
@@ -182,6 +182,21 @@ describe('Drawing Board: Instantiation Templates', function () {
});
+ it('Given a template - User can remove existing vfmodule', function () {
+
+ loadDrawingBoardWithRecreateMode();
+ nodeAction('node-c09e4530-8fd8-418f-9483-2f57ce927b05-vprobe_nc_vnf0..VprobeNcVnf..FE_Add_On_Module_vlbagent_eph..module-1', 'Remove');
+ let removed_vfModule_Path = [
+ ...vnfPath, "vfModules",
+ "vprobe_nc_vnf0..VprobeNcVnf..FE_Add_On_Module_vlbagent_eph..module-1",
+ ];
+
+ assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd([
+ {path: [...vnfPath, "vnfStoreKey"], value: "vProbe_NC_VNF 0"}, // side-effect
+ {path: [...removed_vfModule_Path], value: undefined},
+ ]);
+ });
+
[
{desc: "with changes", modifySomeValues: true},
{desc: "without changes", modifySomeValues: false},
@@ -246,7 +261,46 @@ describe('Drawing Board: Instantiation Templates', function () {
assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd_network();
});
+ it(`Given a stored template of Network - User can remove existing network`, () => {
+
+ loadDrawingBoardWithRecreateModeNetwork();
+
+ nodeAction('node-01f4c475-3f89-4f00-a2f4-39a873dba0ae-SR-IOV Provider 2-1', 'Remove');
+ let removed_network_Path = [
+ "networks", "SR-IOV Provider 2-1",
+ ];
+ let removed_network_counter_Path = [
+ "existingNetworksCounterMap", "f6b6d141-0d4c-427d-ad35-797f3d1abe71",
+ ];
+
+ assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd_network([
+ {path: removed_network_Path, value: undefined},
+ {path: removed_network_counter_Path, value: 0},
+ ]);
+ });
+
+ it('Given a template - User can add a new network', () => {
+
+ loadDrawingBoardWithRecreateModeNetwork();
+
+ // add new node
+ addNewNode('node-SR-IOV Provider 2-1-add-btn')
+ .fillNetworkPopup()
+ .getDrawingBoardDeployBtn().click()
+ .wait('@expectedPostAsyncInstantiation').then(xhr => {
+ const networkRequest = bodyOf(xhr).networks['SR-IOV Provider 2-1_1'];
+
+ expect(networkRequest.action).equals("Create");
+ expect(networkRequest.rollbackOnFailure).equals("true");
+ expect(networkRequest.originalName).equals("SR-IOV Provider 2-1");
+ expect(networkRequest.productFamilyId).equals("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");
+ expect(networkRequest.lcpCloudRegionId).equals("hvf6");
+ expect(networkRequest.lineOfBusiness).equals("zzz1");
+ expect(networkRequest.platformName).equals("xxx1");
+ expect(networkRequest.tenantId).equals("229bcdc6eaeb4ca59d55221141d01f8e");
+ });
+ });
});
});
});