2 Comments

Hi Gleb,

thank you for the lesson. This one was nice and simple :)

I've found a strange moment in the lesson code:

if (something about the response) {

response.send( fixxture: 'success.json' })

}

Shouldn't it be:

if (something about the response) {

response.send({ fixture: 'success.json' })

}

?

And why did you use req.reply for 30% error response? Isn't it simpler to stub, like this:

cy.intercept('GET', '/fruit', Math.random() < 0.3 ? { statusCode: 500 } : undefined)

?

Expand full comment