From: Alexey Sandler Date: Wed, 4 Dec 2019 15:48:06 +0000 (+0200) Subject: Create function that convert rollbackOnFailure value from String to Boolean X-Git-Tag: 6.0.1~120 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=b85a046bb43f83bf1231d34ed5447fc07b2bfe1e;p=vid.git Create function that convert rollbackOnFailure value from String to Boolean Issue-ID: VID-724 Signed-off-by: Alexey Sandler Change-Id: Ia3738a146d0b57e961e097c6b6e70e525c46a397 --- 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 e01ccfda1..5f423f8c2 100644 --- a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts @@ -47,8 +47,9 @@ describe('Drawing Board: Instantiation Templates', function () { // Then... cy.wait('@expectedPostAsyncInstantiation').then(xhr => { - // cy.readFile('cypress/support/jsonBuilders/mocks/jsons/instantiationTemplates/templates__instance_template.json').then((expectedResult) => { - // cy.deepCompare(xhr.request.body, expectedResult); + // cy.readFile('cypress/support/jsonBuilders/mocks/jsons/instantiationTemplates/templates__instance_template.json').then((expectedResult) => { + // convertRollbackOnFailureValueFromStringToBoolean(expectedResult); + // cy.deepCompare(xhr.request.body, expectedResult); // }); }); @@ -56,6 +57,11 @@ describe('Drawing Board: Instantiation Templates', function () { }); + //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) { + expectedResult.rollbackOnFailure = Boolean(expectedResult.rollbackOnFailure); + } function mockAsyncBulkResponse() { cy.server().route({ diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/instantiationTemplates/templates__instance_template.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/instantiationTemplates/templates__instance_template.json index 85f8582ab..3a59dd16b 100644 --- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/instantiationTemplates/templates__instance_template.json +++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/instantiationTemplates/templates__instance_template.json @@ -20,7 +20,7 @@ "aicZoneName": null, "projectName": "Kennedy", "subscriberName": "Emanuel", - "rollbackOnFailure": true, + "rollbackOnFailure": "true", "isALaCarte": true, "testApi": "GR_API", "trackById": "36601560-f8e3-4020-bdef-3e4709c51e84",