title: How to Wait until page is fully loaded
body: <p>I'm using Cypress to test my spa. Sometimes the page displays quickly and sometimes it is very slow. I need to be able to check for a button or text that will display once the page is loaded, but do not want to wait for eternity.</p>
  
  <p>I've been using excessively long wait periods but would like the test to run faster.</p>
  
  <pre><code>let targeturl = 'http:\\something.com'
  let longwait = 2500
  
  describe('Update Case', () =&gt; {
    it('Create Case', () =&gt; {   
      cy.visit(targeturl)
      cy.wait(longwait)
      cy.get('button').contains('Create').click()
  </code></pre>
  
  <p>I want to be able to set a wait that waits until the button 'Create' is displayed.</p>