I'm using react 16.8.1, cypress 3.1.5 and firebase 5.5.3 for e2e tests.
Currently I need to wait for the page to load all the components and then run the tests like getting a button and clicking on it.
Before each test, the programm checks if the user is logged in and if so, it'll wait for firebase to send some POST and GET requests.
Unfortunately cypress shows CypressError: Timed out retrying: cy.wait() timed out waiting 100000ms for the 1st response to the route: 'googleGETRoute'. No response ever occurred. for both GET and POST requests, which makes clicking or continuing the tests impossible.
Before each request I run the following:
beforeEach(function () {
cy.server().route({ url: /https:\/\/.*google.*/, method: "POST" }).as("googleRoute");
cy.server().route({ url: /https:\/\/.*google.*/, method: "GET" }).as("googleGETRoute");
cy.visit('/event');
cy.wait('@googleRoute', xhr => {
cy.url().then((url) => {
if (url === 'http://localhost:3000/login') {
cy.loginByForm(testUserAccount, testUserPassword);
}
});
});
});
And to delete an event:
it('should deleteEvent', function() {
cy.wait('@googleGETRoute', { responseTimeout:100000, log:true });
cy.wait('@googleRoute', { responseTimeout: 100000, log:true });
deleteEvent(event);
cy.contains(event.title).should('not.be.visible');
});
still no responses from firestore. I've also checked #1652 and #2374 which are almost the same as this problem.
Has anyone faced this issue before? Would appreciate any help