Fix trending projects Spinach failure

The trending projects list is now pre-calculated. To make this work
with the Spinach test, we have to manually refresh the list.

Partial fix to #23378
This commit is contained in:
Stan Hu 2016-10-14 16:58:55 -07:00
parent 2ebc63dd3c
commit 5b5c7e048b
2 changed files with 5 additions and 0 deletions

View file

@ -128,6 +128,7 @@ Feature: Explore Projects
And project "Archive" has comments
And I sign in as a user
And project "Community" has comments
And trending projects are refreshed
When I visit the explore trending projects
Then I should see project "Community"
And I should not see project "Internal"

View file

@ -218,6 +218,10 @@ module SharedProject
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')