You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Automated builds in the test environment make E2E testing very heavy #291
Is your feature request related to a problem? Please describe.
I occasionally use Capybara to write E2E tests and was concerned that the tests were very slow. As a result, it took me a little while to realize that it was due to the fact that vite_rails is configured to autoBuild in the test environment.
Describe the solution you'd like
Shouldn't the default config file turn off autoBuild in the test environment, since the source should not be changed during testing?
changed the title [-]Automated builds in the test environment make end-to-end testing very heavy[/-][+]Automated builds in the test environment make E2E testing very heavy[/+]on Oct 29, 2022
You can run assets:precompile or vite:build in the CI once before running integration tests, as it will make it clearer how much time is being spent in assets vs tests. vite:build will detect that assets are up-to-date, skipping the build during tests.
However, autoBuild: true is still a good default for the test environment, as it allows users to avoid building assets manually when running tests locally, and in small apps provides a simpler CI setup.
Activity
[-]Automated builds in the test environment make end-to-end testing very heavy[/-][+]Automated builds in the test environment make E2E testing very heavy[/+]ElMassimo commentedon Oct 31, 2022
Hi Moeki!
You can run
assets:precompileorvite:buildin the CI once before running integration tests, as it will make it clearer how much time is being spent in assets vs tests.vite:buildwill detect that assets are up-to-date, skipping the build during tests.However,
autoBuild: trueis still a good default for the test environment, as it allows users to avoid building assets manually when running tests locally, and in small apps provides a simpler CI setup.cc-kawakami commentedon Oct 31, 2022
I understand. Thank you.