title: Cypress - cy.wait() timed out waiting 5000ms for the 1st request to the route
body: <p>Fairly new to Cypress and it's been smooth sailing so far until I wanted to fake out a network request. Code is like this:</p>
  
  <pre><code>describe('Some test', function(){
  it('Can fake out an XHR response', function(){
      cy.server()
      cy.route('https://reqres.in/api/users', [{ id: 1, name: 'Pat' }]).as('getMessages')
      cy.request('https://reqres.in/api/users')
      cy.wait(['@getMessages'])
  </code></pre>
  
  <p>...</p>
  
  <p>No matter what I try I get:</p>
  
  <p>CypressError: Timed out retrying: cy.wait() timed out waiting 5000ms for the 1st request to the route: 'getMessages'. No request ever occurred.</p>
  
  <p>What am I doing wrong here?</p>
  
  <p>EDIT: I changed the code to this:</p>
  
  <pre><code>cy.server()
  cy.route('https://reqres.in/api/users', [{ id: 1, name: 'Pat' }]).as('getMessages')
  cy.request('https://reqres.in/api/users')
  cy.wait(['@getMessages'])
  </code></pre>
  
  <p>But the result was as below:</p>
  
  <p><a href="https://i.stack.imgur.com/ft2Pb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ft2Pb.png" alt=""></a></p>