summaryrefslogtreecommitdiff
path: root/spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb')
-rw-r--r--spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb17
1 files changed, 4 insertions, 13 deletions
diff --git a/spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb b/spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb
index cd540ca113a..b33d7f90a31 100644
--- a/spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb
+++ b/spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb
@@ -38,8 +38,8 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
click_button "Merge when pipeline succeeds"
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"
+ expect(page).to have_content "The source branch will be removed."
+ expect(page).to have_selector ".js-cancel-auto-merge"
visit_merge_request(merge_request) # Needed to refresh the page
expect(page).to have_content /enabled an automatic merge when the pipeline for \h{8} succeeds/i
end
@@ -93,12 +93,10 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
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
+ click_link 'Merge when pipeline succeeds'
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_content "The source branch will be removed."
expect(page).to have_link "Cancel automatic merge"
end
end
@@ -131,13 +129,6 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
expect(page).to have_content "canceled the automatic merge"
end
- it "allows the user to remove the source branch" do
- expect(page).to have_link "Remove source branch when merged"
-
- click_link "Remove source branch when merged"
- expect(page).to have_content "The source branch will be removed"
- end
-
context 'when pipeline succeeds' do
background { build.success }