Create ManageViaMr component to enable Security features
-
Create a ManageViaMrcomponent that triggers a Gql mutation to enable Security features from the conf. page.-
It should be configurable to accept specific sec. features (TBD) and trigger the corresponding mutation as a result. -
featureprop:Stringto specify what feature we're dealing with. Should be one of theREPORT_TYPE_*constants found inapp/assets/javascripts/vue_shared/security_reports/constants.js. -
Internal map of features feature->GraphQL mutation.
-
-
It should redirect the user to the successPathprovided in the mutation's response. -
Emit an errorevent if the mutation errors-out (error should be handled by the parent, to be confirmed).
-
Specs:
-
Mimic manage_sast_spec.js.-
Triggers the right mutation depending on the provided feature. -
Loading state. -
Doesn't render anything when feature is enabled. -
Emits an error.
-
Edited by Paul Gascou-Vaillancourt