summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/integration
diff options
context:
space:
mode:
authorSara Weiss <sara.weiss@intl.att.com>2019-12-17 13:20:29 +0200
committerIttay Stern <ittay.stern@att.com>2019-12-17 11:36:52 +0000
commit19bfe44c206000e5f71b53c1642f19886be7ad5f (patch)
tree190f9dadedc49a62f6b2190e9cfacd49d40fc649 /vid-webpack-master/cypress/integration
parentfca7e153ab6577914032e100ffff3dfa6392c306 (diff)
Templates: Test deployment of a Cypress *edited* without changes template
Issue-ID: VID-724 Signed-off-by: Sara Weiss <sara.weiss@intl.att.com> Change-Id: If70e4cb35d6a0feb0972da3f212b8a87892004cd
Diffstat (limited to 'vid-webpack-master/cypress/integration')
-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) {