title: Avoid using cy.wait() to wait for a page to load due to aborted get request cypress
body: <p>I'm running a cypress test that requires a page to load before clicking an element and logging in, but for some reason a failed (and aborted) GET request is causing the page to take forever to load and eventually it times out unless I add a cy.wait(6000) before the cy.click() call. I need to somehow wait for the page to load without using a cy.wait(). How can I do this, given that I cant fix the aborted GET request?</p>
  
  <p><a href="https://i.stack.imgur.com/quN0Z.png" rel="noreferrer"><img src="https://i.stack.imgur.com/quN0Z.png" alt="enter image description here"></a></p>
  
  <pre><code>  cy.visit(loginUrl)
    cy.url().should('contain', '#/loginPortal')
    cy.wait(6000) //Allows page to load before trying to log in, needs to be removed
    cy.contains('ButtonText').click()
  </code></pre>