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.ts35
1 files changed, 32 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 f9fe68b20..01a0be0c7 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
@@ -29,7 +29,7 @@ describe('Drawing Board: Instantiation Templates', function () {
assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd();
});
- it('Given a stored template - when "edit" vnf and vfmodules are opened - then template’s details are visible as expected', ()=> {
+ it('Given a stored template - when "edit" vnf and vfmodules are opened - then template’s details are visible as expected and deploy without changes', () => {
loadDrawingBoardWithRecreateMode();
@@ -60,8 +60,6 @@ describe('Drawing Board: Instantiation Templates', function () {
.getElementByDataTestsId("sdncPreLoad").should('have.value', 'on')
.getElementByDataTestsId("cancelButton").click();
-
-
assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd();
});
@@ -81,6 +79,25 @@ describe('Drawing Board: Instantiation Templates', function () {
});
+ it('Given a stored template - edit service vnf and vfmodule without changes - deploy request should be without changes', function () {
+
+ loadDrawingBoardWithRecreateMode();
+
+ //open - set edit service
+ cy.openServiceContextMenu()
+ .getElementByDataTestsId("context-menu-header-edit-item").click()
+ .getElementByDataTestsId('form-set').click();
+
+ //open - set edit vnf
+ editNode("node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0")
+ .getElementByDataTestsId('form-set').click();
+
+ //open - set edit vf
+ editNode("node-c5b26cc1-a66f-4b69-aa23-6abc7c647c88-vprobe_nc_vnf0..VprobeNcVnf..FE_base_module..module-0")
+ .getElementByDataTestsId('form-set').click();
+
+ assertThatBodyFromDeployRequestEqualsToFile();
+ });
});
});
@@ -127,6 +144,18 @@ function assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd() {
});
}
+
+function assertThatBodyFromDeployRequestEqualsToFile() {
+ cy.getDrawingBoardDeployBtn().click();
+ cy.wait('@expectedPostAsyncInstantiation').then(xhr => {
+
+ cy.readFile('../vid-automation/src/test/resources/asyncInstantiation/templates__instance_from_template__set_without_modify1.json').then((expectedResult) => {
+ cy.deepCompare(xhr.request.body, expectedResult);
+ });
+
+ });
+}
+
//We use this function because the deployService() on drawing-board-header.component class
// changes rollbackOnFailure value from string type to boolean.
function convertRollbackOnFailureValueFromStringToBoolean(expectedResult: any) {