diff options
author | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-09-18 16:15:42 +1100 |
---|---|---|
committer | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-09-18 16:15:42 +1100 |
commit | b5a091e3a4c01374138b3b327ec8cde3c23bef69 (patch) | |
tree | e4ced1f34035158a6d4e73d86bb39b6b30ea7451 /features | |
parent | 2defc7b931ac46603780944907d7e19233ad1e97 (diff) | |
download | gitlab-ce-b5a091e3a4c01374138b3b327ec8cde3c23bef69.tar.gz |
Replace the 'project/commits/revert.feature' spinach test with an rspec analog
Diffstat (limited to 'features')
-rw-r--r-- | features/project/commits/revert.feature | 31 | ||||
-rw-r--r-- | features/steps/project/commits/revert.rb | 42 |
2 files changed, 0 insertions, 73 deletions
diff --git a/features/project/commits/revert.feature b/features/project/commits/revert.feature deleted file mode 100644 index 7ee1d717d80..00000000000 --- a/features/project/commits/revert.feature +++ /dev/null @@ -1,31 +0,0 @@ -@project_commits -Feature: Revert Commits - Background: - Given I sign in as a user - And I own a project - And I visit my project's commits page - - @javascript - Scenario: I revert a commit - Given I click on commit link - And I click on the revert button - And I revert the changes directly - Then I should see the revert commit notice - - @javascript - Scenario: I revert a commit that was previously reverted - Given I click on commit link - And I click on the revert button - And I revert the changes directly - And I visit my project's commits page - And I click on commit link - And I click on the revert button - And I revert the changes directly - Then I should see a revert error - - @javascript - Scenario: I revert a commit in a new merge request - Given I click on commit link - And I click on the revert button - And I revert the changes in a new merge request - Then I should see the new merge request notice diff --git a/features/steps/project/commits/revert.rb b/features/steps/project/commits/revert.rb deleted file mode 100644 index ebfa7a878bb..00000000000 --- a/features/steps/project/commits/revert.rb +++ /dev/null @@ -1,42 +0,0 @@ -class Spinach::Features::RevertCommits < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedPaths - include SharedDiffNote - include RepoHelpers - - step 'I click on commit link' do - visit project_commit_path(@project, sample_commit.id) - end - - step 'I click on the revert button' do - find(".header-action-buttons .dropdown").click - find("a[href='#modal-revert-commit']").click - end - - step 'I revert the changes directly' do - page.within('#modal-revert-commit') do - uncheck 'create_merge_request' - click_button 'Revert' - end - end - - step 'I should see the revert commit notice' do - page.should have_content('The commit has been successfully reverted.') - end - - step 'I should see a revert error' do - page.should have_content('Sorry, we cannot revert this commit automatically.') - end - - step 'I revert the changes in a new merge request' do - page.within('#modal-revert-commit') do - click_button 'Revert' - end - end - - step 'I should see the new merge request notice' do - page.should have_content('The commit has been successfully reverted. You can now submit a merge request to get this change into the original branch.') - page.should have_content("From revert-#{Commit.truncate_sha(sample_commit.id)} into master") - end -end |