diff options
Diffstat (limited to 'vid-webpack-master/cypress/support')
-rw-r--r-- | vid-webpack-master/cypress/support/application/application.session.actions.ts | 8 |
1 files changed, 8 insertions, 0 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 42d4d6766..c054b2640 100644 --- a/vid-webpack-master/cypress/support/application/application.session.actions.ts +++ b/vid-webpack-master/cypress/support/application/application.session.actions.ts @@ -2,6 +2,7 @@ declare namespace Cypress { interface Chainable { setReduxState : typeof setReduxState; getReduxState : typeof getReduxState; + clearSessionStorage: typeof clearSessionStorage; setTestApiParamToGR: typeof setTestApiParamToGR; setTestApiParamToVNF: typeof setTestApiParamToVNF; buildReduxStateWithServiceRespone: typeof buildReduxStateWithServiceRespone; @@ -25,6 +26,12 @@ function getReduxState(): Chainable<any> { }); } +function clearSessionStorage() : void { + cy.window().then((win) => { + win.sessionStorage.clear(); + }); +} + function setTestApiParamToGR() : void { cy.window().then((win) => { win.sessionStorage.setItem('msoRequestParametersTestApiValue', 'GR_API'); @@ -72,6 +79,7 @@ function buildReduxStateWithServiceRespone(res: any, serviceId:string, isEcompGe 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); |