Commit 7970c1bb authored by Phil Hughes's avatar Phil Hughes

Remove suggested approvers

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/284825
parent 71e64878
...@@ -13,10 +13,6 @@ ...@@ -13,10 +13,6 @@
= sprite_icon('spinner', size: 24, css_class: 'gl-spinner') = sprite_icon('spinner', size: 24, css_class: 'gl-spinner')
- if can_update_approvers - if can_update_approvers
- approver_presenter = MergeRequestApproverPresenter.new(issuable, skip_user: current_user) - 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? - if approver_presenter.show_code_owner_tips?
.form-text.text-muted .form-text.text-muted
= _('Tip: add a') = _('Tip: add a')
......
...@@ -22,27 +22,12 @@ RSpec.describe 'shared/issuable/_approvals.html.haml' do ...@@ -22,27 +22,12 @@ RSpec.describe 'shared/issuable/_approvals.html.haml' do
end end
context 'has no approvers' do 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 context 'can not override approvers' do
before do before do
allow(view).to receive(:can?).with(user, :update_approvers, merge_request).and_return(false) 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 render 'shared/issuable/approvals', form: form, issuable: merge_request, presenter: presenter
end end
it 'hides suggested approvers' do
expect(rendered).not_to have_css('.suggested-approvers')
end
it 'hides select approvers field' do it 'hides select approvers field' do
expect(rendered).not_to have_css('#merge_request_approver_ids') expect(rendered).not_to have_css('#merge_request_approver_ids')
end 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