test: Load root page before logout to load CSRF token

This commit is contained in:
Suraj Shetty 2023-09-25 09:16:59 +05:30
parent 413f4915e8
commit 3334235e7a

View file

@ -53,6 +53,9 @@ Cypress.Commands.add("login", (email, password) => {
});
Cypress.Commands.add("call", (method, args) => {
if (method === "logout") {
cy.visit("/");
}
return cy
.window()
.its("frappe.csrf_token")