Make incremental webpack compilation work better when running RSpec tests
As mentioned in #300412 (comment 579157279):
If you run a feature spec with js for a page that will be compiled for the first time, it'll likely fail due to the compilation. But in any case if it fails and you run it again, it'll likely succeed, it's just that the compilation takes some time.
Workarounds
- Re-run the spec after the page's bundles have compiled
- Visit the page manually in the GDK before running the spec
- Disable incremental webpack compilation before starting rspec...
- ... either by editing
gdk.yml
then runninggdk reconfigure
- ... or by adding
export DEV_SERVER_INCREMENTAL=false
toenv.runit
- ... either by editing
- ???
Possible fixes
- Make rspec "aware" of incremental webpack compilation by waiting for compilation to finish before running assertions
- Making rspec automatically restart webpack with incremental compilation disabled if it's detected as enabled?
- ???