mammoth-fall-22117
05/08/2022, 2:06 PMthankful-insurance-51131
05/09/2022, 6:56 AMmammoth-fall-22117
05/09/2022, 10:09 AMthankful-insurance-51131
05/09/2022, 12:49 PMthankful-insurance-51131
05/09/2022, 12:57 PMpowerful-orange-86819
05/09/2022, 2:38 PMmammoth-fall-22117
05/09/2022, 4:00 PMgifted-boots-63851
05/09/2022, 4:15 PMts
Cypress.Commands.add('foo', () => {
Cypress.log('foo', ...)
return someLoginFunctionWithHTTPCall()
})
When I call this method cy.foo()
, the network call is made successfully, but cypress is "stuck", it wont go to the next stepmagnificent-finland-58048
05/09/2022, 4:18 PMmagnificent-finland-58048
05/09/2022, 4:19 PMmammoth-fall-22117
05/09/2022, 4:20 PMmagnificent-finland-58048
05/09/2022, 4:21 PMgifted-boots-63851
05/09/2022, 4:21 PMts
Cypress.Commands.add('foo', async () => {
Cypress.log('foo', ...)
await someLoginFunctionWithHTTPCall()
Cypress.log('done', ...)
})
done
is not displayed, so we could believe that the issue is because of my custom function
the thing is my someLoginFunctionWithHTTPCall
is firebase.signInWithEmailAndPassword
magnificent-finland-58048
05/09/2022, 4:21 PMmagnificent-finland-58048
05/09/2022, 4:21 PMmagnificent-finland-58048
05/09/2022, 4:21 PMmagnificent-finland-58048
05/09/2022, 4:22 PMgifted-boots-63851
05/09/2022, 4:25 PMts
Cypress.Commands.add('firebaseLogin', () => {
return firebase.signIn(...)
})
and call the command from another one?
ts
Cypress.Commands.add('login', () => {
return cy.firebaseLogin()
})
magnificent-finland-58048
05/09/2022, 4:26 PMmagnificent-finland-58048
05/09/2022, 4:26 PMmagnificent-finland-58048
05/09/2022, 4:27 PMgifted-boots-63851
05/09/2022, 4:27 PMgifted-boots-63851
05/09/2022, 4:27 PMgifted-boots-63851
05/09/2022, 4:31 PMmagnificent-finland-58048
05/09/2022, 4:35 PMgifted-boots-63851
05/09/2022, 6:34 PMgifted-boots-63851
05/09/2022, 7:17 PMmagnificent-finland-58048
05/09/2022, 7:45 PMrough-sugar-96535
05/09/2022, 9:35 PM