diff options
author | Rémy Coutable <remy@rymai.me> | 2017-09-11 19:45:45 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-09-11 19:45:45 +0300 |
commit | de14e9c20392c4edfb9ee05f8a3364d7510a4f99 (patch) | |
tree | 1b64a20695aad43e425dfb3c7807406691b7aace /features | |
parent | 73a913f2b5f2a5dd36e13e09d74264d1da218d6a (diff) | |
parent | da31584deafb8346b7889a7e98c534a08f57f5d8 (diff) |
Merge branch 'replace_project_merge_requests_accept.feature' into 'master'
Replace the 'project/merge_requests/accept.feature' spinach test with an rspec analog
See merge request !14176
Diffstat (limited to 'features')
-rw-r--r-- | features/project/merge_requests/accept.feature | 28 | ||||
-rw-r--r-- | features/steps/project/merge_requests/acceptance.rb | 55 |
2 files changed, 0 insertions, 83 deletions
diff --git a/features/project/merge_requests/accept.feature b/features/project/merge_requests/accept.feature deleted file mode 100644 index 2ab1c19f452..00000000000 --- a/features/project/merge_requests/accept.feature +++ /dev/null @@ -1,28 +0,0 @@ -@project_merge_requests -Feature: Project Merge Requests Acceptance - Background: - Given There is an open Merge Request - And I am signed in as a developer of the project - - @javascript - Scenario: Accepting the Merge Request and removing the source branch - Given I am on the Merge Request detail page - When I check the "Remove source branch" option - And I click on Accept Merge Request - Then I should see merge request merged - And I should not see the Remove Source Branch button - - @javascript - Scenario: Accepting the Merge Request when URL has an anchor - Given I am on the Merge Request detail with note anchor page - When I check the "Remove source branch" option - And I click on Accept Merge Request - Then I should see merge request merged - And I should not see the Remove Source Branch button - - @javascript - Scenario: Accepting the Merge Request without removing the source branch - Given I am on the Merge Request detail page - When I click on Accept Merge Request - Then I should see merge request merged - And I should see the Remove Source Branch button diff --git a/features/steps/project/merge_requests/acceptance.rb b/features/steps/project/merge_requests/acceptance.rb deleted file mode 100644 index 3c640e3512a..00000000000 --- a/features/steps/project/merge_requests/acceptance.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps - include LoginHelpers - include WaitForRequests - - step 'I am on the Merge Request detail page' do - visit merge_request_path(@merge_request) - end - - step 'I am on the Merge Request detail with note anchor page' do - visit merge_request_path(@merge_request, anchor: 'note_123') - end - - step 'I uncheck the "Remove source branch" option' do - uncheck('Remove source branch') - end - - step 'I check the "Remove source branch" option' do - check('Remove source branch') - end - - step 'I click on Accept Merge Request' do - click_button('Merge') - end - - step 'I should see the Remove Source Branch button' do - expect(page).to have_selector('.js-remove-branch-button') - - # Wait for View Resource requests to complete so they don't blow up if they are - # only handled after `DatabaseCleaner` has already run - wait_for_requests - end - - step 'I should not see the Remove Source Branch button' do - expect(page).not_to have_selector('.js-remove-branch-button') - - # Wait for View Resource requests to complete so they don't blow up if they are - # only handled after `DatabaseCleaner` has already run - wait_for_requests - end - - step 'There is an open Merge Request' do - @user = create(:user) - @project = create(:project, :public, :repository) - @project_member = create(:project_member, :developer, user: @user, project: @project) - @merge_request = create(:merge_request, :with_diffs, :simple, source_project: @project) - end - - step 'I am signed in as a developer of the project' do - sign_in(@user) - end - - step 'I should see merge request merged' do - expect(page).to have_content('The changes were merged into') - end -end |