summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/integration
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2020-01-29 15:11:47 +0200
committerEylon Malin <eylon.malin@intl.att.com>2020-01-30 23:23:36 +0200
commitaefc6a0e43b8ce36134dbbed71cf2b4cb9745a9f (patch)
tree82e6a44cdb477657796d3280aa0a9ef91aea1fe3 /vid-webpack-master/cypress/integration
parent714c28d14b53b91eac1a5ffa3ebdf63650028918 (diff)
don't show delete in menu action while edit a macro service
Issue-ID: VID-760 Change-Id: Ieed2b7430cc1584681b1143d8b7244801dd8a1c4 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Diffstat (limited to 'vid-webpack-master/cypress/integration')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts2
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/vnfGroups.e2e.ts38
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);