Fix onboarding test failure causing other tests to fail (#2417)

This commit is contained in:
akash-codemonk 2021-01-04 15:52:22 +05:30 committed by hetunandu
parent d1d73070f4
commit 1e17c03478
2 changed files with 5 additions and 9 deletions

View File

@ -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");
});
});

View File

@ -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);