Merge branch 'mr-widget-bug-fix' into 'master'
Fix the MR widget that merged any MR when choosing the option "Merge when pipeline succeeds" from the dropdown Closes #29568 See merge request !10611
This commit is contained in:
commit
862b74bc46
3 changed files with 19 additions and 1 deletions
|
@ -18,7 +18,7 @@
|
|||
Select merge moment
|
||||
%ul.js-merge-dropdown.dropdown-menu.dropdown-menu-right{ role: 'menu' }
|
||||
%li
|
||||
= link_to "#", class: "merge_when_pipeline_succeeds" do
|
||||
= link_to "#", class: "merge-when-pipeline-succeeds" do
|
||||
= icon('check fw')
|
||||
Merge when pipeline succeeds
|
||||
%li
|
||||
|
|
5
changelogs/unreleased/mr-widget-bug-fix.yml
Normal file
5
changelogs/unreleased/mr-widget-bug-fix.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix MR widget bug that merged a MR when Merge when pipeline succeeds was clicked
|
||||
via the dropdown
|
||||
merge_request: 10611
|
||||
author:
|
|
@ -89,6 +89,19 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
|
|||
it_behaves_like 'Merge when pipeline succeeds activator'
|
||||
end
|
||||
end
|
||||
|
||||
describe 'enabling Merge when pipeline succeeds via dropdown' do
|
||||
it 'activates the Merge when pipeline succeeds feature' do
|
||||
click_button 'Select merge moment'
|
||||
within('.js-merge-dropdown') do
|
||||
click_link 'Merge when pipeline succeeds'
|
||||
end
|
||||
|
||||
expect(page).to have_content "Set by #{user.name} to be merged automatically when the pipeline succeeds."
|
||||
expect(page).to have_content "The source branch will not be removed."
|
||||
expect(page).to have_link "Cancel automatic merge"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when merge when pipeline succeeds is enabled' do
|
||||
|
|
Loading…
Reference in a new issue