I think the first line may be consuming 1st reques...
# e2e-testing
t
I think the first line may be consuming 1st request, and the cy.get the 2nd. So maybe it should be
Copy code
js
cy.wait("@rating", { timeout: 60000 }).then((xhr: any) => {
  expect(xhr.statusCode).to.eq(200);
  const quotestatus = xhr.response.body.isReferred;
  cy.wrap(xhr.response.body.isReferred).as("quoteisrefBool");
});
a 60 second timeout is quite generous too 😅 Also, I could be wrong, though i think this may be clear for you too
Copy code
js
cy.wait("@rating", { timeout: 60000 }).then({ response}) => {
  expect(response.statusCode).to.eq(200);
  cy.wrap(response.body.isReferred).as("quoteisrefBool");
});
@User I wanted to make sure you saw this and made this thread so we don't bog down the main channel
4 Views