Commit b0d463e1 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/284825/removeSuggestedApprovers' into 'master'

Remove suggested approvers

See merge request gitlab-org/gitlab!49016
parents bf907df0 7970c1bb
......@@ -13,10 +13,6 @@
= sprite_icon('spinner', size: 24, css_class: 'gl-spinner')
- if can_update_approvers
- approver_presenter = MergeRequestApproverPresenter.new(issuable, skip_user: current_user)
.form-text.text-muted.suggested-approvers
- if approver_presenter.any?
Suggested approvers:
= approver_presenter.render
- if approver_presenter.show_code_owner_tips?
.form-text.text-muted
= _('Tip: add a')
......
......@@ -22,27 +22,12 @@ RSpec.describe 'shared/issuable/_approvals.html.haml' do
end
context 'has no approvers' do
context 'when mr_collapsed_approval_rules feature flag is off' do
before do
stub_feature_flags(mr_collapsed_approval_rules: false)
render 'shared/issuable/approvals', form: form, issuable: merge_request, presenter: presenter
end
it 'shows suggested approvers' do
expect(rendered).to have_css('.suggested-approvers')
end
end
context 'can not override approvers' do
before do
allow(view).to receive(:can?).with(user, :update_approvers, merge_request).and_return(false)
render 'shared/issuable/approvals', form: form, issuable: merge_request, presenter: presenter
end
it 'hides suggested approvers' do
expect(rendered).not_to have_css('.suggested-approvers')
end
it 'hides select approvers field' do
expect(rendered).not_to have_css('#merge_request_approver_ids')
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment