Commit 8af83bbf authored by Fabio Pitino's avatar Fabio Pitino Committed by Filipa Lacerda

Always show "Pipelines must succeed" checkbox

Before: the checkbox was hidden if builds were disabled.

The checkbox should not be linked to the builds feature
because they are 2 separate functionality.
parent 5c3cab3d
...@@ -175,11 +175,6 @@ export default { ...@@ -175,11 +175,6 @@ export default {
if (value === 0) toggleHiddenClassBySelector('.merge-requests-feature', true); if (value === 0) toggleHiddenClassBySelector('.merge-requests-feature', true);
else if (oldValue === 0) toggleHiddenClassBySelector('.merge-requests-feature', false); else if (oldValue === 0) toggleHiddenClassBySelector('.merge-requests-feature', false);
}, },
buildsAccessLevel(value, oldValue) {
if (value === 0) toggleHiddenClassBySelector('.builds-feature', true);
else if (oldValue === 0) toggleHiddenClassBySelector('.builds-feature', false);
},
}, },
methods: { methods: {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.form-group .form-group
%b= s_('ProjectSettings|Merge checks') %b= s_('ProjectSettings|Merge checks')
%p.text-secondary= s_('ProjectSettings|These checks must pass before merge requests can be merged') %p.text-secondary= s_('ProjectSettings|These checks must pass before merge requests can be merged')
.form-check.mb-2.builds-feature{ class: ("hidden" if @project && @project.project_feature.send(:builds_access_level) == 0) } .form-check.mb-2.builds-feature
= form.check_box :only_allow_merge_if_pipeline_succeeds, class: 'form-check-input' = form.check_box :only_allow_merge_if_pipeline_succeeds, class: 'form-check-input'
= form.label :only_allow_merge_if_pipeline_succeeds, class: 'form-check-label' do = form.label :only_allow_merge_if_pipeline_succeeds, class: 'form-check-label' do
= s_('ProjectSettings|Pipelines must succeed') = s_('ProjectSettings|Pipelines must succeed')
......
---
title: Always show "Pipelines must succeed" checkbox
merge_request: 28651
author:
type: fixed
...@@ -51,7 +51,7 @@ describe 'Projects > Settings > User manages merge request settings' do ...@@ -51,7 +51,7 @@ describe 'Projects > Settings > User manages merge request settings' do
end end
it 'shows the Merge Requests settings that do not depend on Builds feature' do it 'shows the Merge Requests settings that do not depend on Builds feature' do
expect(page).not_to have_content 'Pipelines must succeed' expect(page).to have_content 'Pipelines must succeed'
expect(page).to have_content 'All discussions must be resolved' expect(page).to have_content 'All discussions must be resolved'
within('.sharing-permissions-form') do within('.sharing-permissions-form') do
......
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