Investigate slow jest tests + fill test gaps
Summary
Some of the jests test under analytics/cycle_analytics occasionally timeout when running locally, particularly some tests in base_spec and custom_stage_form_spec.
Improvements
We should investigate if these can be easily fixed, additionally we should:
-
Make more use of shallow rendering if available -
Utilise snapshot tests where they make sense -
Add the missing tests for the receiveCycleAnalyticsDataSuccessaction -
Add missing tests for: ee/.../stage_nav_item.vue- no data available, with / without stage median values etc -
Clean up mocked requests in base_specas we might not need them now we check the requests inactions_spec -
Fix todo by adding a test or remove text -
Drop old cycle analytics fixtures and rspec fixture -
Reduce some duplication in ee/spec/features/analytics/cycle_analytics/cycle_analytics_spec.rb -
Check coverage -
Remove setUrlParamsmock and asserthistoryPushStatereceives correct params
Risks
Involved components
ee/spec/frontend/analytics/cycle_analytics/**/*_spec.jsee/spec/features/analytics/cycle_analytics/cycle_analytics_spec.rb
Optional: Intended side effects
- Eliminate test timeouts
- Faster test execution
- Increased coverage
Optional: Missing test coverage
Edited by Ezekiel Kigbo