title: How can I wait for a request to load in Cypress?
body: <p>I'm writing automate test on Cypress and I want to wait for a page to load.
  There is a request named &quot;Availability&quot; that if it passes with statusCode:200 then the page loads.</p>
  <p>I've tried this, but it didn't work:</p>
  <pre><code>cy.intercept('POST' , '*/api/Availability/*').as('availability') 
  
  cy.wait('@availability').its('response.statusCode').should('eq' , 200)
  </code></pre>
  <p>How can I do this?</p>