aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/support
diff options
context:
space:
mode:
authorAmichai Hemli <amichai.hemli@intl.att.com>2019-10-29 14:37:48 +0000
committerGerrit Code Review <gerrit@onap.org>2019-10-29 14:37:48 +0000
commit8cb79d98ec8c9f2b2ec495eca11ca067dbc06acb (patch)
treeebc96d58fb45ed601d05ec292b1b4a277eb7a163 /vid-webpack-master/cypress/support
parentb0a5365842404f32667ba6cbda12853323624eaf (diff)
parent32dbf8017aeab06041992064feaf70953ef86e19 (diff)
Merge "Introduce cy.clearSessionStorage"
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);