From 3334235e7a62c6e9324528be8abca47d0324c5b6 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Mon, 25 Sep 2023 09:16:59 +0530 Subject: [PATCH] test: Load root page before logout to load CSRF token --- cypress/support/commands.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 5cc68a7c48..488f0e450c 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -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")