Use new License compliance approval_status [frontend]
this is a corresponding issue for and that can be done after #333578 (closed)
We use legacy license compliance approval statuses blacklisted
and approved
and we need to change them to a new pair of names denied
and applied
On backend, we'll follow next plan:
-
#333578 (closed) - hide changes under feature flag
lc_remove_legacy_approval_status
and update the usage of approval status names everywhere except public API endpoints - #335707 (closed) - fix usage of these names in public API endpoints
Implementation Plan
We need to plan correspondent changes for the frontend:
Action: (This is the UI terminology for selecting an action to take when changing the state from the management screen, behind the scenes backend is sent the state
value, not the action
)
"Approve" -> "Allow"
"Blacklist" -> "Deny"
State: (This is what we match with backend)
"Approved" -> "Allowed"
"Blacklisted" -> "Denied"
Inject feature flag
-
Inject feature flag from rails controller for the
show
action to make available via GON. -
Consume flag in constants, to toggle constants value
constants
Usage inUpdate all usages/references in unit tests:
ee/app/assets/javascripts/vue_merge_request_widget/extensions/license_compliance/index.js
ee/app/assets/javascripts/vue_shared/license_compliance/constants.js
ee/spec/frontend/license_compliance/components/app_spec.js
ee/spec/frontend/vue_shared/license_compliance/license_management_spec.js
ee/spec/frontend/vue_shared/license_compliance/mock_data.js
ee/spec/frontend/vue_shared/license_compliance/mr_widget_license_report_spec.js
ee/spec/frontend/vue_shared/license_compliance/components/admin_license_management_row_spec.js
ee/spec/frontend/vue_shared/license_compliance/components/license_management_row_spec.js
ee/spec/frontend/vue_shared/license_compliance/store/actions_spec.js
ee/spec/frontend/vue_shared/license_compliance/store/getters_spec.js
ee/spec/frontend/vue_shared/license_compliance/store/utils_spec.js
#212484 (comment 875980273))
Additional locations (as mentioned in- ee/spec/frontend/license_compliance/components/app_spec.js
- ee/spec/frontend/vue_shared/license_compliance/
- ee/spec/frontend/vue_shared/license_compliance/components/
- ee/spec/frontend/vue_shared/license_compliance/components/store/
- qa/qa/ee/page/project/secure/license_compliance.rb
Testing
-
Remove changes to qa/qa/specs/features/ee/browser_ui/13_secure/merge_request_license_widget_spec.rb
in !79266 (diffs)