chore: log editor state on test failure (#24703)

Added some logs to be printed on failure. Hoping this would help in
debugging the loading issue. Will remove it later once it is fixed.
Related to https://github.com/appsmithorg/appsmith/issues/23713
This commit is contained in:
akash-codemonk 2023-06-21 16:43:51 +05:30 committed by GitHub
parent d99f5206cc
commit c7dd9f354a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,6 +43,13 @@ Cypress.on("uncaught:exception", () => {
});
Cypress.on("fail", (error) => {
cy.window()
.its("store")
.invoke("getState")
.then((state) => {
cy.log(`Editor initialised: ${state.ui.editor.initialized}`);
cy.log(`Loading guided tour: ${state.ui.guidedTour.loading}`);
});
throw error; // throw error to have test still fail
});