Test with intercept succeeds locally but fails on CircleCi #9597
Unanswered
katia-aa
asked this question in
Questions and Help
Replies: 2 comments 5 replies
-
That is very weird, when you run locally it shows the "getAnswers" badge on that XHR to |
Beta Was this translation helpful? Give feedback.
1 reply
-
It seems to me that |
Beta Was this translation helpful? Give feedback.
4 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.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to use
cy.intercept
to stub an api. The problem occurs on CircleCi. Locally the test runs fine.I am using cypress 6.1.0
Here is my test:
The error I am getting on circle ci looks like this:
I was able to access the screenshot saved by CircleCi and it looks like this
From the debugging I've done, it seems like the request never actually completes on CircleCi. I tried the following which didn't work:
wait('@getAnswers').then(() => /* assert things */))
wait('@getAnswers', {timeout: 60000})
and up to 2 minuteswait(20000)
after typing 'furnace' in the testnone of these are working on CircleCi and all produce the same error:
No request ever occurred
.I thought maybe I'd find my answer here: https://glebbahmutov.com/blog/cypress-intercept-problems/
But none of the gotchas seem to relate to my issue.
In case there was a caching issue on CircleCi - I did try deleting
if-none-match
:but that wasn't it either.
Beta Was this translation helpful? Give feedback.
All reactions