-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If webpacker hasn't built the expected bundles yet, 💥 #18
Comments
I can be wrong, but it has to work in another way. Like before starting tests, you need to precompile assets. It is the same as database migrations. |
I tried and can't replicate this. Closing for now until I can |
@searls we just hit this issue when we were setting up The issue happened because we would first run When we moved the webpack build step before the cypress step, everything was fine. Perhaps this could be added to |
I'm not familiar with other libraries forcing this onto users. I wonder if there's some API the gem could be calling to ensure Webpacker or Sprockets assets are compiled for test? |
I have some ideas in how we might spelunk through the rails code to understand who and when calls the asset compilation stuff, but it won't do me much good until I can repeatedly reproduce this problem and I have so far failed to reproduce it. If you could provide a repo and/or reproduction steps that'd be a great help |
Here you go, sir: I've also tried to make each commit very small and explain exactly what I did in each commit: The repro steps are in |
Ahhhhh, sorry, I re-read the issue again. We're talking about two separate issues.
So it works for us the same way as it is for you. But at first it was confusing to find that first couple of cypress tests timed out. We looked in those tests, looking for errors, but the issue was that webpacker would kick-off the building of frontend assets. I guess this is more of our oversight, but perhaps this should be added to the |
I'm running into an issue that sounds like this one. This is the error I'm getting from the Rails server:
Does anyone know whether this is the same issue or something else? |
If the template computes an expected bundle path and it's not present (because WDS isn't running or because the app hasn't been run in dev mode and built it upon request), then the tests will fail.
This seems probably due to how we're launching the rails server—there must be some flag to compile webpacker via an executor hook in our test server so that this does not happen.
The text was updated successfully, but these errors were encountered: