title: On click on the submenu need to add route and avoid wait to load the details
body: <p>I have a web application and logged into that. On the Menu &gt; Submenu I have a 'Customers' link. When I click on the customers link there is some delay in loading the page
  Can we add a <code>cy.route()</code> for that ? The below route is not working. For the time being I am using cy.wait() an need to avoid that.</p>
  <p>I am getting an error &gt;&gt; Timed out retrying: cy.wait() timed out waiting 5000ms for the 1st request to the route: getCustomers. No request ever occurred.</p>
  <pre><code>context('Route testing', () =&gt; {
    before(() =&gt; {
      cy.loginToWebApplication();
    });
  
    it('Test route', () =&gt; {
      cy.server();
      cy.route({
        method: 'GET',
        url: 'https://testsite-url/company/customers.php',
      }).as('getCustomers');
      cy.get('#submenu_People ul li a')
        .contains('Customers')
        .click({force: true});
      cy.get('input[name=&quot;searchText&quot;]').type('Some Customer');
      cy.wait('@getCustomers');
    });
  });
  
  </code></pre>
  <p>Another example, one on click on the Search button, some delay in navigating and displaying the invoice data: In both cases routes are not working, could someone please give some idea.</p>
  <pre><code>it('Test route', () =&gt; {
    cy.server();
    cy.route({
      method: 'GET',
      url:
        '**invoices.php?&amp;ajaxCall=true&amp;selectedMainItem=invoices&amp;invoiceItem=unpaid**',
    }).as('invoicesSearch');
    cy.get('#Invoices ul li a').contains('Current Invoices').click({force: true});
    cy.get('#resultsTable tbody tr').each(($tr, index) =&gt; {
      const invoiceID = Cypress.$($tr).find('td').eq(1).text();
      if (invoiceID == 1280) {
        cy.get('#searchText').type(invoiceID);
      }
    });
    cy.get('.searchContainer button[type=&quot;button&quot;]')
      .contains('Search')
      .click({force: true});
    cy.wait('@invoicesSearch');
    cy.get('#invoicesSearch h2').contains('Current Invoices (1)');
  });
  
  </code></pre>