diff options
author | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-10-11 15:26:04 +1100 |
---|---|---|
committer | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-10-11 15:26:04 +1100 |
commit | bd69b794350f44ff750798c476a9cd27861fedfa (patch) | |
tree | 2bf5507fa76e17f1959763bcd500bc22150c0bf2 /features/steps | |
parent | 2a9147b747ded82e0970c3f8235e9d9e27bd0ab4 (diff) | |
download | gitlab-ce-bd69b794350f44ff750798c476a9cd27861fedfa.tar.gz |
Replace the 'features/explore/projects.feature' spinach test with an rspec analogreplace_explore_projects.feature
Diffstat (limited to 'features/steps')
-rw-r--r-- | features/steps/explore/projects.rb | 145 | ||||
-rw-r--r-- | features/steps/shared/paths.rb | 13 | ||||
-rw-r--r-- | features/steps/shared/project.rb | 18 |
3 files changed, 0 insertions, 176 deletions
diff --git a/features/steps/explore/projects.rb b/features/steps/explore/projects.rb deleted file mode 100644 index 962e39dde9a..00000000000 --- a/features/steps/explore/projects.rb +++ /dev/null @@ -1,145 +0,0 @@ -class Spinach::Features::ExploreProjects < Spinach::FeatureSteps - include SharedAuthentication - include SharedPaths - include SharedProject - include SharedUser - - step 'I should see project "Empty Public Project"' do - expect(page).to have_content "Empty Public Project" - end - - step 'I should see public project details' do - expect(page).to have_content '32 branches' - expect(page).to have_content '16 tags' - end - - step 'I should see project readme' do - expect(page).to have_content 'README.md' - end - - step 'I should see empty public project details' do - expect(page).not_to have_content 'Git global setup' - end - - step 'I should see empty public project details with http clone info' do - project = Project.find_by(name: 'Empty Public Project') - page.all(:css, '.git-empty .clone').each do |element| - expect(element.text).to include(project.http_url_to_repo) - end - end - - step 'I should see empty public project details with ssh clone info' do - project = Project.find_by(name: 'Empty Public Project') - page.all(:css, '.git-empty .clone').each do |element| - expect(element.text).to include(project.url_to_repo) - end - end - - step 'I should see project "Community" home page' do - page.within '.breadcrumbs .breadcrumb-item-text' do - expect(page).to have_content 'Community' - end - end - - step 'I should see project "Internal" home page' do - page.within '.breadcrumbs .breadcrumb-item-text' do - expect(page).to have_content 'Internal' - end - end - - step 'I should see an http link to the repository' do - project = Project.find_by(name: 'Community') - expect(page).to have_field('project_clone', with: project.http_url_to_repo) - end - - step 'I should see an ssh link to the repository' do - project = Project.find_by(name: 'Community') - expect(page).to have_field('project_clone', with: project.url_to_repo) - end - - step 'I visit "Community" issues page' do - create(:issue, - title: "Bug", - project: public_project - ) - create(:issue, - title: "New feature", - project: public_project - ) - visit project_issues_path(public_project) - end - - step 'I should see list of issues for "Community" project' do - expect(page).to have_content "Bug" - expect(page).to have_content public_project.name - expect(page).to have_content "New feature" - end - - step 'I visit "Internal" issues page' do - create(:issue, - title: "Internal Bug", - project: internal_project - ) - create(:issue, - title: "New internal feature", - project: internal_project - ) - visit project_issues_path(internal_project) - end - - step 'I should see list of issues for "Internal" project' do - expect(page).to have_content "Internal Bug" - expect(page).to have_content internal_project.name - expect(page).to have_content "New internal feature" - end - - step 'I visit "Community" merge requests page' do - visit project_merge_requests_path(public_project) - end - - step 'project "Community" has "Bug fix" open merge request' do - create(:merge_request, - title: "Bug fix for public project", - source_project: public_project, - target_project: public_project - ) - end - - step 'I should see list of merge requests for "Community" project' do - expect(page).to have_content public_project.name - expect(page).to have_content public_merge_request.source_project.name - end - - step 'I visit "Internal" merge requests page' do - visit project_merge_requests_path(internal_project) - end - - step 'project "Internal" has "Feature implemented" open merge request' do - create(:merge_request, - title: "Feature implemented", - source_project: internal_project, - target_project: internal_project - ) - end - - step 'I should see list of merge requests for "Internal" project' do - expect(page).to have_content internal_project.name - expect(page).to have_content internal_merge_request.source_project.name - end - - def internal_project - @internal_project ||= Project.find_by!(name: 'Internal') - end - - def public_project - @public_project ||= Project.find_by!(name: 'Community') - end - - def internal_merge_request - @internal_merge_request ||= MergeRequest.find_by!(title: 'Feature implemented') - end - - def public_merge_request - @public_merge_request ||= MergeRequest.find_by!(title: 'Bug fix for public project') - end -end diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index be69a96c3ee..dc0e3ac59a5 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -454,19 +454,6 @@ module SharedPaths # ---------------------------------------- # Public Projects # ---------------------------------------- - - step 'I visit the public projects area' do - visit explore_projects_path - end - - step 'I visit the explore trending projects' do - visit trending_explore_projects_path - end - - step 'I visit the explore starred projects' do - visit starred_explore_projects_path - end - step 'I visit the public groups area' do visit explore_groups_path end diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb index 96cc0745e97..5e4edaf99a6 100644 --- a/features/steps/shared/project.rb +++ b/features/steps/shared/project.rb @@ -112,10 +112,6 @@ module SharedProject # Visibility of archived project # ---------------------------------------- - step 'archived project "Archive"' do - create(:project, :archived, :public, :repository, name: 'Archive') - end - step 'I should not see project "Archive"' do project = Project.find_by(name: "Archive") expect(page).not_to have_content project.name_with_namespace @@ -126,11 +122,6 @@ module SharedProject expect(page).to have_content project.name_with_namespace end - step 'project "Archive" has comments' do - project = Project.find_by(name: "Archive") - 2.times { create(:note_on_issue, project: project) } - end - # ---------------------------------------- # Visibility level # ---------------------------------------- @@ -209,15 +200,6 @@ module SharedProject create :project_empty_repo, :public, name: "Empty Public Project" end - step 'project "Community" has comments' do - project = Project.find_by(name: "Community") - 2.times { create(:note_on_issue, project: project) } - end - - step 'trending projects are refreshed' do - TrendingProject.refresh! - end - step 'project "Shop" has labels: "bug", "feature", "enhancement"' do project = Project.find_by(name: "Shop") create(:label, project: project, title: 'bug') |