Commit 74359d6d560bf3291db3069008a6610394d69db0
Committed by
Rafael Manzo
1 parent
f63c5c24
Exists in
colab
and in
4 other branches
Added acceptance test for the case of a repository processing without ranges
Showing
5 changed files
with
37 additions
and
3 deletions
Show diff stats
.gitignore
features/repository/show/metric_results.feature
... | ... | @@ -23,6 +23,23 @@ Feature: Repository metric results |
23 | 23 | When I wait up for the ajax request |
24 | 24 | Then I should see "There is only one point and it will not be printed into a chart." |
25 | 25 | |
26 | + @kalibro_restart @kalibro_processor_restart @javascript | |
27 | + Scenario: Should show the no range message after a process without range | |
28 | + Given I am a regular user | |
29 | + And I am signed in | |
30 | + And I have a sample project | |
31 | + And I have a sample configuration with native metrics but without ranges | |
32 | + And I have a sample repository within the sample project | |
33 | + And I start to process that repository | |
34 | + And I wait up for a ready processing | |
35 | + And I ask for the last ready processing of the given repository | |
36 | + And I ask for the module result of the given processing | |
37 | + And I ask for the metric results of the given module result | |
38 | + When I visit the repository show page | |
39 | + And I click the "Metric Results" h3 | |
40 | + And I see a sample metric's name | |
41 | + Then I should see "Missing range" | |
42 | + | |
26 | 43 | # TODO: Scenario: Should show the graphic of a given metric |
27 | 44 | # It was getting really difficult to test this because of Poltergeist's timeouts |
28 | 45 | # so we gave up on this for now |
29 | 46 | \ No newline at end of file | ... | ... |
features/step_definitions/mezuro_range_steps.rb
features/step_definitions/repository_steps.rb
1 | +Given(/^I have a sample configuration with native metrics but without ranges$/) do | |
2 | + reading_group = FactoryGirl.create(:reading_group, id: nil) | |
3 | + reading = FactoryGirl.create(:reading, {id: nil, group_id: reading_group.id}) | |
4 | + @mezuro_configuration = FactoryGirl.create(:mezuro_configuration, id: nil) | |
5 | + metric_configuration = FactoryGirl.create(:metric_configuration, | |
6 | + {id: nil, | |
7 | + metric: FactoryGirl.build(:loc), | |
8 | + reading_group_id: reading_group.id, | |
9 | + configuration_id: @mezuro_configuration.id, | |
10 | + code: 'loc'}) | |
11 | +end | |
12 | + | |
1 | 13 | Given(/^I have a sample configuration with native metrics$/) do |
2 | 14 | reading_group = FactoryGirl.create(:reading_group, id: nil) |
3 | 15 | reading = FactoryGirl.create(:reading, {id: nil, group_id: reading_group.id}) | ... | ... |