From 6c3957aa302f4b2ea42ae6757f577015bda7a616 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Fri, 16 Jun 2023 11:01:21 +0530 Subject: [PATCH] test: Return cy.request promise from login - to make cypress wait for the promise. --- cypress/support/commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 4b44a24598..3ad9aa090a 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -34,7 +34,7 @@ Cypress.Commands.add("login", (email, password) => { if (!password) { password = Cypress.env("adminPassword"); } - cy.request({ + return cy.request({ url: "/api/method/login", method: "POST", body: {