Merge "Improve clearSessionStorage timings"
authorEylon Malin <eylon.malin@intl.att.com>
Thu, 2 Apr 2020 09:36:10 +0000 (09:36 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 2 Apr 2020 09:36:10 +0000 (09:36 +0000)
vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
vid-webpack-master/cypress/support/application/application.session.actions.ts

index 027901f..ac36f67 100644 (file)
@@ -134,10 +134,11 @@ describe('View Edit Page: Upgrade VFModule', function () {
   describe('More UI test', () => {
 
     beforeEach(() => {
-      cy.clearSessionStorage();
-      cy.setTestApiParamToGR();
-      cy.initVidMock();
-      cy.login();
+      cy.clearSessionStorage().then(() => {
+        cy.setTestApiParamToGR();
+        cy.initVidMock();
+        cy.login();
+      });
     });
 
     afterEach(() => {
index 9126ae1..99d5d86 100644 (file)
@@ -25,8 +25,8 @@ function getReduxState(): Chainable<any> {
   });
 }
 
-function clearSessionStorage() : void {
-  cy.window().then((win) => {
+function clearSessionStorage() : Cypress.Chainable<any> {
+  return cy.window().then((win) => {
     win.sessionStorage.clear();
   });
 }