billions-receptionist-99356
11/22/2022, 3:18 PMcy.visit()
failed trying to load:
http://localhost:3000/
The response we received from your web server was:
> 403: Forbidden
This was considered a failure because the status code was not 2xx
.
If you do not want status codes to cause failures pass the option: `failOnStatusCode: false``swift-fireman-48516
11/22/2022, 3:33 PMswift-fireman-48516
11/22/2022, 3:35 PMnutritious-army-46708
11/22/2022, 4:30 PMmysterious-belgium-25713
11/22/2022, 5:51 PMsticky-energy-17458
11/22/2022, 6:08 PMmysterious-belgium-25713
11/22/2022, 6:23 PMjs
var num = 2.9
console.log(num | 0); // 2
mysterious-belgium-25713
11/22/2022, 6:24 PMjs
parseInt(d, 10);
sticky-energy-17458
11/22/2022, 6:28 PMmysterious-belgium-25713
11/22/2022, 6:51 PMmysterious-belgium-25713
11/22/2022, 6:52 PMgray-kilobyte-89541
11/22/2022, 6:52 PMcloseTo
assertion examples by searching https://cypress.tips/searchmysterious-belgium-25713
11/22/2022, 6:53 PMbitter-judge-96754
11/22/2022, 8:07 PMadventurous-beach-9295
11/22/2022, 8:17 PMbitter-fountain-36713
11/22/2022, 8:23 PMbitter-judge-96754
11/22/2022, 8:27 PMpowerful-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 CIbitter-fountain-36713
11/22/2022, 9:08 PMmysterious-belgium-25713
11/22/2022, 9:24 PMfreezing-wall-7568
11/22/2022, 10:35 PMbitter-fountain-36713
11/22/2022, 10:52 PMnutritious-analyst-96582
11/22/2022, 10:52 PMbitter-judge-96754
11/23/2022, 3:54 AMmysterious-belgium-25713
11/23/2022, 7:44 AMstale-wire-41120
11/23/2022, 7:45 AMfresh-doctor-14925
11/23/2022, 9:08 AMcy.origin()
?stale-wire-41120
11/23/2022, 9:08 AMstale-wire-41120
11/23/2022, 9:08 AMfresh-doctor-14925
11/23/2022, 9:09 AM