Stubbed requests via cy.request are slow or don't respond at all #25732
Unanswered
ihor-panasiuk95
asked this question in
Questions and Help
Replies: 1 comment
-
Note: via cypress open tests are much stable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey guys! Last 2 weeks I'm learning Cypress and I have the issue with cy.request.
I have just few tests (about 10) and for each test I stub all api calls via cy.request.
And the issue is that randomly tests fail (sometimes 1 test, sometimes 2-3) by timeouts via cypress run. During the investigation and analyzing video and screenshots I see that my app displays loader for a long time although all requests are stubbed and hence it cannot find needed elements.
Increasing of defaultCommandTimeout does not help - tests fail randomly (sometimes pass).
I stub requests in beforeEach/before hooks. Also I noticed that stubbed requests take about 1-2sec in network tab although they should respond instantly.
What that could be?
Beta Was this translation helpful? Give feedback.
All reactions