diff options
author | Eylon Malin <eylon.malin@intl.att.com> | 2020-01-29 15:11:47 +0200 |
---|---|---|
committer | Eylon Malin <eylon.malin@intl.att.com> | 2020-01-30 23:23:36 +0200 |
commit | aefc6a0e43b8ce36134dbbed71cf2b4cb9745a9f (patch) | |
tree | 82e6a44cdb477657796d3280aa0a9ef91aea1fe3 /vid-webpack-master/cypress/support/application | |
parent | 714c28d14b53b91eac1a5ffa3ebdf63650028918 (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/support/application')
-rw-r--r-- | vid-webpack-master/cypress/support/application/application.session.actions.ts | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/vid-webpack-master/cypress/support/application/application.session.actions.ts b/vid-webpack-master/cypress/support/application/application.session.actions.ts index c054b2640..9126ae1a4 100644 --- a/vid-webpack-master/cypress/support/application/application.session.actions.ts +++ b/vid-webpack-master/cypress/support/application/application.session.actions.ts @@ -5,7 +5,6 @@ declare namespace Cypress { clearSessionStorage: typeof clearSessionStorage; setTestApiParamToGR: typeof setTestApiParamToGR; setTestApiParamToVNF: typeof setTestApiParamToVNF; - buildReduxStateWithServiceRespone: typeof buildReduxStateWithServiceRespone; } } @@ -44,42 +43,8 @@ function setTestApiParamToVNF() : void { }); } -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]: { - "existingVNFCounterMap": {}, - "existingVnfGroupCounterMap": {}, - "existingNetworksCounterMap": {}, - "vnfs": {}, - "vnfGroups": {}, - "isEcompGeneratedNaming": isEcompGeneratedNaming, - "existingNames": {}, - "vidNotions": res.service.vidNotions - } - } - } - })); - }); -} - Cypress.Commands.add('setReduxState', setReduxState); Cypress.Commands.add('getReduxState', getReduxState); Cypress.Commands.add('clearSessionStorage', clearSessionStorage); Cypress.Commands.add('setTestApiParamToGR', setTestApiParamToGR); Cypress.Commands.add('setTestApiParamToVNF',setTestApiParamToVNF); -Cypress.Commands.add('buildReduxStateWithServiceRespone', buildReduxStateWithServiceRespone); |