Component testing, wait for webpack to finish #24204
Replies: 2 comments
-
@AlexandreGaubert did you figure out how to fix this? We are struggling with the same issue. It's driving me crazy 🤯 |
Beta Was this translation helpful? Give feedback.
-
@apdrsn I was running into this problem as well, and while I could not solve the issue, I was able to mitigate it somewhat. I am also using a CRA app (ejected), so my workaround was simply to make the build faster so that it would complete within the time alotted. For me, that included setting a pair of environment variables for my cypress CICD job to eliminate features and artifacts I didn't need: cypress-components:
variables:
GENERATE_SOURCEMAP: "false"
DISABLE_ESLINT_PLUGIN: "true" Hopefully this gives you and/or someone else who finds this issue in the future on Google a place to start. |
Beta Was this translation helpful? Give feedback.
-
We have a
create-react-app
project, and when we hitcypress run --component
, Cypress doesn't seems to wait until webpack has finished the build.It seems to be the cause of a bug we have in the CI. Here you can see that we get a
Timed out waiting for the browser to connect.
, probably because webpack is not done yet.When we have this message, the first test suite is reported with duplicated tests. In logs above, the
Timeline
test file contains only one suite with one test.Most of the time the job pass, but sometimes we get the error below:
After looking in the
/resources/app/packages/server/lib/reporter.js
, cypress seems to listen tosuite end
andsuite start
event, but the first event occurs more than the second and the Array is initialized with a negative length.This bug never occurs on our MacOS laptops.
Here's the github action Yaml for the related job:
Beta Was this translation helpful? Give feedback.
All reactions