cypress wait code example
Example 1: cypress wait object to change
.contains('Stuff', { timeout: 5000 }) // Timeout after 5 secs
Example 2: stubbing in cypress
cy.server() // enable response stubbing
cy.route({
method: 'GET', // Route all GET requests
url: '/users/*', // that have a URL that matches '/users/*'
response: [] // and force the response to be: []
})