Commit d3ea5387 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Tests for trending/starred pages

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 974b5a7b
...@@ -21,5 +21,5 @@ ...@@ -21,5 +21,5 @@
= link_to pluralize(project.repository.tag_names.count, 'tag'), project_tags_path(project) = link_to pluralize(project.repository.tag_names.count, 'tag'), project_tags_path(project)
- else - else
%i.icon-warning-sign %i.icon-warning-sign
Empty repository Empty repository
...@@ -100,3 +100,17 @@ Feature: Explore Projects Feature ...@@ -100,3 +100,17 @@ Feature: Explore Projects Feature
And I visit "Internal" merge requests page And I visit "Internal" merge requests page
And project "Internal" has "Feature implemented" open merge request And project "Internal" has "Feature implemented" open merge request
Then I should see list of merge requests for "Internal" project 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"
...@@ -355,9 +355,13 @@ module SharedPaths ...@@ -355,9 +355,13 @@ module SharedPaths
visit explore_projects_path visit explore_projects_path
end end
# ---------------------------------------- step 'I visit the explore trending projects' do
# Public Groups 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 step 'I visit the public groups area' do
visit explore_groups_path visit explore_groups_path
......
...@@ -130,4 +130,9 @@ module SharedProject ...@@ -130,4 +130,9 @@ module SharedProject
step 'public empty project "Empty Public Project"' do step 'public empty project "Empty Public Project"' do
create :empty_project, :public, name: "Empty Public Project" create :empty_project, :public, name: "Empty Public Project"
end end
step 'project "Community" has comments' do
project = Project.find_by(name: "Community")
2.times { create(:note_on_issue, project: project) }
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment