summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-26 10:33:42 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-26 10:33:42 +0300
commitd3ea53877d689df64db9c68f43e2c08f527b01ed (patch)
treeda717d728adc60c9e0e8e751027bb31eb40c333f /features
parent974b5a7b2f31f8e7d6b38a45bfd055a40651c945 (diff)
downloadgitlab-ce-d3ea53877d689df64db9c68f43e2c08f527b01ed.tar.gz
Tests for trending/starred pages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'features')
-rw-r--r--features/explore/projects.feature14
-rw-r--r--features/steps/shared/paths.rb10
-rw-r--r--features/steps/shared/project.rb5
3 files changed, 26 insertions, 3 deletions
diff --git a/features/explore/projects.feature b/features/explore/projects.feature
index 2ed9707ec39..9827ebe3e57 100644
--- a/features/explore/projects.feature
+++ b/features/explore/projects.feature
@@ -100,3 +100,17 @@ Feature: Explore Projects Feature
And I visit "Internal" merge requests page
And project "Internal" has "Feature implemented" open merge request
Then I should see list of merge requests for "Internal" project
+
+ Scenario: Trending page
+ Given I sign in as a user
+ And project "Community" has comments
+ When I visit the explore trending projects
+ Then I should see project "Community"
+ And I should not see project "Internal"
+ And I should not see project "Enterprise"
+
+ Scenario: Most starred page
+ Given I sign in as a user
+ When I visit the explore starred projects
+ Then I should see project "Community"
+ And I should see project "Internal"
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index 111d40c0e1b..ab1ae31ed74 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -355,9 +355,13 @@ module SharedPaths
visit explore_projects_path
end
- # ----------------------------------------
- # Public Groups
- # ----------------------------------------
+ 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
diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb
index ba6f090a706..1d894b33fbd 100644
--- a/features/steps/shared/project.rb
+++ b/features/steps/shared/project.rb
@@ -130,4 +130,9 @@ module SharedProject
step 'public empty project "Empty Public Project"' do
create :empty_project, :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
end