test: Return cy.request promise from login

- to make cypress wait for the promise.
This commit is contained in:
Suraj Shetty 2023-06-16 11:01:21 +05:30
parent 91afe51c7c
commit 6c3957aa30

View file

@ -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: {