From 1e17c03478bf7c962d6ecf15dea1ba89d72c16ef Mon Sep 17 00:00:00 2001 From: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com> Date: Mon, 4 Jan 2021 15:52:22 +0530 Subject: [PATCH] Fix onboarding test failure causing other tests to fail (#2417) --- .../Smoke_TestSuite/Onboarding/Onboarding_spec.js | 8 -------- app/client/cypress/support/index.js | 6 +++++- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/client/cypress/integration/Smoke_TestSuite/Onboarding/Onboarding_spec.js b/app/client/cypress/integration/Smoke_TestSuite/Onboarding/Onboarding_spec.js index d1ae914ce8..30e87049b7 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/Onboarding/Onboarding_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/Onboarding/Onboarding_spec.js @@ -59,12 +59,4 @@ describe("Onboarding", function() { cy.PublishtheApp(); cy.get(".t--continue-on-my-own").click(); }); - - after(() => { - localStorage.removeItem("OnboardingState"); - cy.window().then((window) => { - window.indexedDB.deleteDatabase("Appsmith"); - }); - cy.log("Cleared"); - }); }); diff --git a/app/client/cypress/support/index.js b/app/client/cypress/support/index.js index bbdf39e556..35f0fd6d5d 100644 --- a/app/client/cypress/support/index.js +++ b/app/client/cypress/support/index.js @@ -33,6 +33,10 @@ Cypress.on("fail", (error, runnable) => { before(function() { cy.startServerAndRoutes(); + // Clear indexedDB + cy.window().then((window) => { + window.indexedDB.deleteDatabase("Appsmith"); + }); const username = Cypress.env("USERNAME"); const password = Cypress.env("PASSWORD"); cy.LoginFromAPI(username, password); @@ -43,7 +47,7 @@ before(function() { 200, ); - cy.generateUUID().then(id => { + cy.generateUUID().then((id) => { appId = id; cy.CreateApp(id); localStorage.setItem("AppName", appId);