Move "Integration active" toggle to integration_form.vue
What does this MR do and why?
This MR is part 2 of of #342121 (closed), an effort to remove app/assets/javascripts/integrations/integration_settings_form.js
and move its current responsibilities to Vuex or existing Vue components.
Part 1: !75484 (merged).
Tl;dr:
- Remove
TOGGLE_INTEGRATION_EVENT
, handle integration active toggling in the Vue component - Move form validation checks to the Vue component, and write tests for these
Longer version:
In this MR, we remove the TOGGLE_INTEGRATION_EVENT
event from the event hub and shift all toggling responsibilities to the integration_form.vue
component. When an integration activation status changes, we set/unset the novalidate
argument of the form.
We also move any form validation checks to the Vue component. It was easier to do this in the same MR, but it meant that some tests needed to be added
How to set up and validate locally
- Enable and configure the Jira integration for the project. More information.
- Uncheck the
enable integration
checkbox. - Make the form invalid (e.g. don't enter an email address)
- Click Save Changes. The form should submit.
- Check the
enable integration
checkbox. - Click Save Changes. The form shouldn't submit and you should get a validation error.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #342121 (closed)