diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/project/archived.feature | 30 | ||||
-rw-r--r-- | features/project/commits/revert.feature | 31 | ||||
-rw-r--r-- | features/search.feature | 100 | ||||
-rw-r--r-- | features/steps/project/archived.rb | 36 | ||||
-rw-r--r-- | features/steps/project/commits/revert.rb | 42 | ||||
-rw-r--r-- | features/steps/search.rb | 116 |
6 files changed, 0 insertions, 355 deletions
diff --git a/features/project/archived.feature b/features/project/archived.feature deleted file mode 100644 index ad466f4f307..00000000000 --- a/features/project/archived.feature +++ /dev/null @@ -1,30 +0,0 @@ -Feature: Project Archived - Background: - Given I sign in as a user - And I own project "Shop" - And I own project "Forum" - - Scenario: I should not see archived on project page of not-archive project - And project "Forum" is archived - And I visit project "Shop" page - Then I should not see "Archived" - - Scenario: I should see archived on project page of archive project - And project "Forum" is archived - And I visit project "Forum" page - Then I should see "Archived" - - Scenario: I archive project - When project "Shop" has push event - And I visit project "Shop" page - And I visit edit project "Shop" page - And I set project archived - Then I should see "Archived" - - Scenario: I unarchive project - When project "Shop" has push event - And project "Shop" is archived - And I visit project "Shop" page - And I visit edit project "Shop" page - And I set project unarchived - Then I should not see "Archived" 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/search.feature b/features/search.feature deleted file mode 100644 index f894b6b84a1..00000000000 --- a/features/search.feature +++ /dev/null @@ -1,100 +0,0 @@ -@dashboard -Feature: Search - Background: - Given I sign in as a user - And I own project "Shop" - And I visit dashboard search page - - Scenario: I should see project I am looking for - Given I search for "Sho" - Then I should see "Shop" project link - - @javascript - Scenario: I should see issues I am looking for - And project has issues - When I search for "Foo" - And I click "Issues" link - Then I should see "Foo" link in the search results - And I should not see "Bar" link in the search results - - @javascript - Scenario: I should see merge requests I am looking for - And project has merge requests - When I search for "Foo" - When I click "Merge requests" link - Then I should see "Foo" link in the search results - And I should not see "Bar" link in the search results - - @javascript - Scenario: I should see milestones I am looking for - And project has milestones - When I search for "Foo" - When I click "Milestones" link - Then I should see "Foo" link in the search results - And I should not see "Bar" link in the search results - - @javascript - Scenario: I should see project code I am looking for - When I click project "Shop" link - And I search for "rspec" - Then I should see code results for project "Shop" - - @javascript - Scenario: I should see project issues - And project has issues - When I click project "Shop" link - And I search for "Foo" - And I click "Issues" link - Then I should see "Foo" link in the search results - And I should not see "Bar" link in the search results - - @javascript - Scenario: I should see project merge requests - And project has merge requests - When I click project "Shop" link - And I search for "Foo" - And I click "Merge requests" link - Then I should see "Foo" link in the search results - And I should not see "Bar" link in the search results - - @javascript - Scenario: I should see project milestones - And project has milestones - When I click project "Shop" link - And I search for "Foo" - And I click "Milestones" link - Then I should see "Foo" link in the search results - And I should not see "Bar" link in the search results - - @javascript - Scenario: I should see Wiki blobs - And project has Wiki content - When I click project "Shop" link - And I search for "Wiki content" - And I click "Wiki" link - Then I should see "test_wiki" link in the search results - - Scenario: I logout and should see project I am looking for - Given project "Shop" is public - And I logout directly - And I visit dashboard search page - And I search for "Sho" - Then I should see "Shop" project link - - @javascript - Scenario: I logout and should see issues I am looking for - Given project "Shop" is public - And I logout directly - And I visit dashboard search page - And project has issues - When I search for "Foo" - And I click "Issues" link - Then I should see "Foo" link in the search results - And I should not see "Bar" link in the search results - - Scenario: I logout and should see project code I am looking for - Given project "Shop" is public - And I logout directly - When I visit project "Shop" page - And I search for "rspec" on project page - Then I should see code results for project "Shop" diff --git a/features/steps/project/archived.rb b/features/steps/project/archived.rb deleted file mode 100644 index e4847180be9..00000000000 --- a/features/steps/project/archived.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Spinach::Features::ProjectArchived < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedPaths - - When 'project "Forum" is archived' do - project = Project.find_by(name: "Forum") - project.update_attribute(:archived, true) - end - - When 'project "Shop" is archived' do - project = Project.find_by(name: "Shop") - project.update_attribute(:archived, true) - end - - When 'I visit project "Forum" page' do - project = Project.find_by(name: "Forum") - visit project_path(project) - end - - step 'I should not see "Archived"' do - expect(page).not_to have_content "Archived" - end - - step 'I should see "Archived"' do - expect(page).to have_content "Archived" - end - - When 'I set project archived' do - click_link "Archive" - end - - When 'I set project unarchived' do - click_link "Unarchive" - end -end 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 diff --git a/features/steps/search.rb b/features/steps/search.rb deleted file mode 100644 index 16c4a5ab2e4..00000000000 --- a/features/steps/search.rb +++ /dev/null @@ -1,116 +0,0 @@ -class Spinach::Features::Search < Spinach::FeatureSteps - include SharedAuthentication - include SharedPaths - include SharedProject - - step 'I search for "Sho"' do - fill_in "dashboard_search", with: "Sho" - click_button "Search" - end - - step 'I search for "Foo"' do - fill_in "dashboard_search", with: "Foo" - find('.btn-search').trigger('click') - end - - step 'I search for "rspec"' do - fill_in "dashboard_search", with: "rspec" - find('.btn-search').trigger('click') - end - - step 'I search for "rspec" on project page' do - fill_in "search", with: "rspec" - click_button "Go" - end - - step 'I search for "Wiki content"' do - fill_in "dashboard_search", with: "content" - find('.btn-search').trigger('click') - end - - step 'I click "Issues" link' do - page.within '.search-filter' do - click_link 'Issues' - end - end - - step 'I click project "Shop" link' do - find('.js-search-project-dropdown').trigger('click') - page.within '.project-filter' do - click_link project.name_with_namespace - end - end - - step 'I click "Merge requests" link' do - page.within '.search-filter' do - click_link 'Merge requests' - end - end - - step 'I click "Milestones" link' do - page.within '.search-filter' do - click_link 'Milestones' - end - end - - step 'I click "Wiki" link' do - page.within '.search-filter' do - click_link 'Wiki' - end - end - - step 'I should see "Shop" project link' do - expect(page).to have_link "Shop" - end - - step 'I should see code results for project "Shop"' do - page.within('.results') do - page.should have_content 'Update capybara, rspec-rails, poltergeist to recent versions' - end - end - - step 'I search for "Contibuting"' do - fill_in "dashboard_search", with: "Contibuting" - click_button "Search" - end - - step 'project has issues' do - create(:issue, title: "Foo", project: project) - create(:issue, title: "Bar", project: project) - end - - step 'project has merge requests' do - create(:merge_request, title: "Foo", source_project: project, target_project: project) - create(:merge_request, :simple, title: "Bar", source_project: project, target_project: project) - end - - step 'project has milestones' do - create(:milestone, title: "Foo", project: project) - create(:milestone, title: "Bar", project: project) - end - - step 'I should see "Foo" link in the search results' do - page.within('.results') do - find(:css, '.search-results').should have_link 'Foo' - end - end - - step 'I should not see "Bar" link in the search results' do - expect(find(:css, '.search-results')).not_to have_link 'Bar' - end - - step 'I should see "test_wiki" link in the search results' do - page.within('.results') do - expect(find(:css, '.search-results')).to have_link 'test_wiki' - end - end - - step 'project has Wiki content' do - @wiki = ::ProjectWiki.new(project, current_user) - @wiki.create_page("test_wiki", "Some Wiki content", :markdown, "first commit") - end - - step 'project "Shop" is public' do - project.update_attributes(visibility_level: Project::PUBLIC) - end -end |