powerful-gigabyte-69168
11/22/2022, 8:45 PMsetupGameAsP0() which is a regular js function that calls several custom cypress commands including creating multiple accounts and making a game.
Someone tried wrapping the beginning of the function in cy.then() and it suddenly works, to my bewilderment. Can anyone help me make sense of this?
We now have
cy.then(() => { // we added this wrapping cy.then()
if (!alreadyAuthenticated) {
cy.wipeDatabase();
cy.visit('/');
cy.signupPlayer(username, validPassword);
}
});
and suddenly the tests pass in CI