Hi all, does anyone encounters an error with cy wa...
# help
a
Hi all, does anyone encounters an error with cy wait on ci/cd pipeline? (mine is on gitlab) The error was - CypressError: Timed out retrying after 5000ms:
cy.wait()
timed out waiting
5000ms
for the 1st request to the route:
getMetadata
. No request ever occurred. https://on.cypress.io/wait tho it is working perfectly fine on my local.
b
There doesn't seem to be any actions on the app between your
.intercept()
and the corresponding
.wait()
. This may work fine on your local due to the high network speeds, but in your CI with more limiting resources and slower speeds, it will be an issue. You should check in the test runner when the request is made and move the
.intercept()
before that action/step and then move the
.wait()
soon after the action/step.
a
Ah that make sense that’s why it timed out . However I modify my test instead of using intercept I switch to route. I call the server first then route.
b
.route()
and
.server()
are deprecated since v6.0.0
3 Views