diff options
Diffstat (limited to 'vid-webpack-master/cypress/integration')
-rw-r--r-- | vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts | 2 | ||||
-rw-r--r-- | vid-webpack-master/cypress/integration/iFrames/vnfGroups.e2e.ts | 38 |
2 files changed, 39 insertions, 1 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts index 87875f1ba..ac5790ddf 100644 --- a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts @@ -16,6 +16,8 @@ export const initServicePlanning = function (viewOrEdit: string, customModelFile } cy.readFile('../vid-automation/src/test/resources/aaiGetInstanceTopology/ServiceTreeWithMultipleChildren_serviceModel.json').then((res) => { + res.service.instantiationType = "A-La-Carte"; + res.service.vidNotions.instantiationType = "ALaCarte"; jsonBuilderAndMock.basicJson( res, Cypress.config('baseUrl') + "/rest/models/services/6e59c5de-f052-46fa-aa7e-2fca9d674c44", diff --git a/vid-webpack-master/cypress/integration/iFrames/vnfGroups.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/vnfGroups.e2e.ts index 60fbfeaba..a0882f5bf 100644 --- a/vid-webpack-master/cypress/integration/iFrames/vnfGroups.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/vnfGroups.e2e.ts @@ -20,6 +20,42 @@ describe('Vnf Groups', function () { cy.screenshot(); }); + function updateObject(obj: any, key: string, val: any, value:any) { + return JSON.parse(JSON.stringify(obj) + .replace(new RegExp(`"${key}":"${val}"`), `"${key}":"${value}"`)) + } + + function buildReduxStateWithServiceRespone(res: any, serviceId:string, isEcompGeneratedNaming:boolean) :void { + res = updateObject(res, "ecomp_generated_naming", !isEcompGeneratedNaming, isEcompGeneratedNaming); + cy.window().then((win) => { + win.sessionStorage.setItem('reduxState', JSON.stringify({ + "global": { + "name": null + }, + "service": { + "serviceHierarchy": { + [serviceId] : res + }, + "serviceInstance": { + [serviceId]: { + "modelInfo" : { + "modelVersionId" : serviceId + }, + "existingVNFCounterMap": {}, + "existingVnfGroupCounterMap": {}, + "existingNetworksCounterMap": {}, + "vnfs": {}, + "vnfGroups": {}, + "isEcompGeneratedNaming": isEcompGeneratedNaming, + "existingNames": {}, + "vidNotions": res.service.vidNotions + } + } + } + })); + }); + } + describe('Vnf Group model basic view', function () { it('Vnf group open new view edit', function () { @@ -36,7 +72,7 @@ describe('Vnf Groups', function () { "ServiceWithVnfGroup", ); - cy.buildReduxStateWithServiceRespone(res, serviceId, false); + buildReduxStateWithServiceRespone(res, serviceId, false); cy.openIframe('app/ui/#/servicePlanning?serviceModelId=' + serviceId); cy.getElementByDataTestsId('node-' + groupName).find(`[data-tests-id='node-type-indicator']`).contains('G'); cy.getElementByDataTestsId('node-' + groupName).contains('' + groupName); |