Always update frontend fixtures (generate if necessary)
There are two ways to run Karma tests:
-
bundle exec rake karma
which always runsbundle exec rake karma:fixtures
and regenerates all frontend fixtures -
yarn karma
which never runsbundle exec rake karma:fixtures
and therefore assumes the fixtures are already there/updated
We should introduce a way to always run the Karma tests with updated frontend fixtures but without regenerating all of them.
Plan
- store the generated fixtures in the repository
- add a static analysis script to make sure fixtures are updated
- document that fixtures no longer need to be generated unless HAML templates or JSON responses change (https://docs.gitlab.com/ee/development/testing_guide/frontend_testing.html#karma-test-suite)
Edited by Inactive Account