diff options
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb (renamed from spec/features/merge_requests/merge_when_build_succeeds_spec.rb) | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/spec/features/merge_requests/merge_when_build_succeeds_spec.rb b/spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb index a710ca66f70..638b27172ec 100644 --- a/spec/features/merge_requests/merge_when_build_succeeds_spec.rb +++ b/spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -feature 'Merge When Build Succeeds', feature: true, js: true do +feature 'Merge When Pipeline Succeeds', :feature, :js do let(:user) { create(:user) } let(:project) { create(:project, :public) } @@ -18,7 +18,7 @@ feature 'Merge When Build Succeeds', feature: true, js: true do before { project.team << [user, :master] } - context 'when there is active build for merge request' do + context 'when there is active pipeline for merge request' do background do create(:ci_build, pipeline: pipeline) end @@ -28,16 +28,16 @@ feature 'Merge When Build Succeeds', feature: true, js: true do visit_merge_request(merge_request) end - it 'displays the Merge When Build Succeeds button' do - expect(page).to have_button "Merge When Build Succeeds" + it 'displays the Merge When Pipeline Succeeds button' do + expect(page).to have_button "Merge When Pipeline Succeeds" end - context "Merge When Build succeeds enabled" do + context "Merge When Pipeline Succeeds enabled" do before do - click_button "Merge When Build Succeeds" + click_button "Merge When Pipeline Succeeds" end - it 'activates Merge When Build Succeeds feature' do + it 'activates Merge When Pipeline Succeeds feature' do expect(page).to have_link "Cancel Automatic Merge" expect(page).to have_content "Set by #{user.name} to be merged automatically when the pipeline succeeds." @@ -49,7 +49,7 @@ feature 'Merge When Build Succeeds', feature: true, js: true do end end - context 'when merge when build succeeds is enabled' do + context 'when merge when pipeline succeeds is enabled' do let(:merge_request) do create(:merge_request_with_diffs, :simple, source_project: project, author: user, @@ -70,7 +70,7 @@ feature 'Merge When Build Succeeds', feature: true, js: true do it 'allows to cancel the automatic merge' do click_link "Cancel Automatic Merge" - expect(page).to have_button "Merge When Build Succeeds" + expect(page).to have_button "Merge When Pipeline Succeeds" visit_merge_request(merge_request) # refresh the page expect(page).to have_content "canceled the automatic merge" @@ -83,7 +83,7 @@ feature 'Merge When Build Succeeds', feature: true, js: true do expect(page).to have_content "The source branch will be removed" end - context 'when build succeeds' do + context 'when pipeline succeeds' do background { build.success } it 'merges merge request' do @@ -95,10 +95,11 @@ feature 'Merge When Build Succeeds', feature: true, js: true do end end - context 'when build is not active' do - it "does not allow to enable merge when build succeeds" do + context 'when pipeline is not active' do + it "does not allow to enable merge when pipeline succeeds" do visit_merge_request(merge_request) - expect(page).not_to have_link "Merge When Build Succeeds" + + expect(page).not_to have_link 'Merge When Pipeline Succeeds' end end |