Commit 657dff5ca3c354a62ff99600c0bf382705fa9577
1 parent
8b3bce0a
Exists in
colab
and in
2 other branches
Fix homepage cache acceptance test
It was still relying on repositories with no attributes while Repository#latest now relies on attributes to list just the public ones.
Showing
2 changed files
with
10 additions
and
1 deletions
Show diff stats
features/homepage.feature
... | ... | @@ -7,7 +7,7 @@ Feature: Homepage |
7 | 7 | Scenario: Before signing in |
8 | 8 | Given I have a project named "GCC" |
9 | 9 | And there is a public configuration created named "Test Configuration" |
10 | - And I have a sample repository named "Test Repository" | |
10 | + And I have a public repository named "Test Repository" | |
11 | 11 | Then I am at the homepage |
12 | 12 | And I should see "Home" |
13 | 13 | And I should see "Projects" | ... | ... |
features/step_definitions/repository_steps.rb
... | ... | @@ -135,6 +135,15 @@ Given(/^I have a sample configuration with the (\w+) native metric$/) do |metric |
135 | 135 | kalibro_configuration_id: @kalibro_configuration.id}) |
136 | 136 | end |
137 | 137 | |
138 | +Given(/^I have a public repository named "(.*?)"$/) do |name| | |
139 | + @repository = FactoryGirl.create(:repository, | |
140 | + project_id: nil, | |
141 | + kalibro_configuration_id: @kalibro_configuration.id, | |
142 | + id: nil, | |
143 | + name: name) | |
144 | + FactoryGirl.create(:repository_attributes, {repository_id: @repository.id}) | |
145 | +end | |
146 | + | |
138 | 147 | When(/^I click on the sample metric's name$/) do |
139 | 148 | find_link(@metric_results.first.metric_configuration.metric.name).trigger('click') |
140 | 149 | end | ... | ... |