aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/support
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-10-29 12:58:49 +0200
committerIttay Stern <ittay.stern@att.com>2019-10-29 13:25:05 +0000
commit32dbf8017aeab06041992064feaf70953ef86e19 (patch)
tree7b2afd8e0dc9b78d43a7128f02c42449887ac6f8 /vid-webpack-master/cypress/support
parent6b3717d92d93e756f30c84e89dd5873226907e62 (diff)
Introduce cy.clearSessionStorage
Issue-ID: VID-647 Change-Id: I51471f736577599c1ace8e330a4db089deccc8ca Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/cypress/support')
-rw-r--r--vid-webpack-master/cypress/support/application/application.session.actions.ts8
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);