Reduce complexity of ee_mr_widget_options
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Context
(Follow up from !27120 (merged))
Description
When moving the ee_mr_widget_options_spec over to Jest, we noticed that this is a huge spec file and a lot of the individual specs are bumping into each other. We could try to just clean up the specs, but part of this is caused by a very large and complex component.
Let's clean up the component and the specs! Here's some ideas:
- Move the call to
MRWidgetService.fetchInitialData()out of the component and intoapp/assets/javascripts/vue_merge_request_widget/index.js. This way we won't be managing state and asynchronous events in our component tests. - Instead of having the EE
MrWidgetOptionscomponent extend the CE one, let's see if we can have it compose the CE one🤔
Edited by 🤖 GitLab Bot 🤖