Commit 9cc28192eb43cf956cd430afbab5425adf685c90
1 parent
1f3578ae
Exists in
colab
and in
4 other branches
Add acceptance test to check for ruby metric results on repository show
Signed off by: Diego Araújo <diegoamc90@gmail.com>
Showing
2 changed files
with
18 additions
and
3 deletions
Show diff stats
features/repository/show/metric_results.feature
@@ -17,7 +17,7 @@ Feature: Repository metric results | @@ -17,7 +17,7 @@ Feature: Repository metric results | ||
17 | And I ask for the metric results of the given module result | 17 | And I ask for the metric results of the given module result |
18 | When I visit the repository show page | 18 | When I visit the repository show page |
19 | And I click the "Tree Metric Results" h3 | 19 | And I click the "Tree Metric Results" h3 |
20 | - And I see a sample metric's name | 20 | + And I should see the sample metric's name |
21 | And I click on the sample metric's name | 21 | And I click on the sample metric's name |
22 | Then I should see "Loading data. Please, wait." | 22 | Then I should see "Loading data. Please, wait." |
23 | 23 | ||
@@ -35,7 +35,7 @@ Feature: Repository metric results | @@ -35,7 +35,7 @@ Feature: Repository metric results | ||
35 | And I ask for the metric results of the given module result | 35 | And I ask for the metric results of the given module result |
36 | When I visit the repository show page | 36 | When I visit the repository show page |
37 | And I click the "Tree Metric Results" h3 | 37 | And I click the "Tree Metric Results" h3 |
38 | - And I see a sample metric's name | 38 | + And I should see the sample metric's name |
39 | Then I should see "Missing range" | 39 | Then I should see "Missing range" |
40 | 40 | ||
41 | @kalibro_configuration_restart @kalibro_processor_restart @javascript | 41 | @kalibro_configuration_restart @kalibro_processor_restart @javascript |
@@ -51,6 +51,21 @@ Feature: Repository metric results | @@ -51,6 +51,21 @@ Feature: Repository metric results | ||
51 | And I click the "Tree Metric Results" h3 | 51 | And I click the "Tree Metric Results" h3 |
52 | Then I should see "Repository process returned with error. There are no tree metric results." | 52 | Then I should see "Repository process returned with error. There are no tree metric results." |
53 | 53 | ||
54 | + @kalibro_processor_restart @kalibro_configuration_restart @javascript | ||
55 | + Scenario: Should show the metric results after processing with a ruby metric configuration | ||
56 | + Given I am a regular user | ||
57 | + And I am signed in | ||
58 | + And I have a sample configuration with ruby native metrics | ||
59 | + And I have a sample repository | ||
60 | + And I start to process that repository | ||
61 | + And I wait up for a ready processing | ||
62 | + And I ask for the last ready processing of the given repository | ||
63 | + And I ask for the module result of the given processing | ||
64 | + And I ask for the metric results of the given module result | ||
65 | + When I visit the repository show page | ||
66 | + And I click the "Tree Metric Results" h3 | ||
67 | + Then I should see the sample metric's name | ||
68 | + | ||
54 | # TODO: Scenario: Should show the graphic of a given metric | 69 | # TODO: Scenario: Should show the graphic of a given metric |
55 | # It was getting really difficult to test this because of Poltergeist's timeouts | 70 | # It was getting really difficult to test this because of Poltergeist's timeouts |
56 | # so we gave up on this for now | 71 | # so we gave up on this for now |
features/step_definitions/repository_steps.rb
@@ -103,7 +103,7 @@ Given(/^I ask for the hotspot metric results of the given module result$/) do | @@ -103,7 +103,7 @@ Given(/^I ask for the hotspot metric results of the given module result$/) do | ||
103 | @metric_results = @module_result.hotspot_metric_results | 103 | @metric_results = @module_result.hotspot_metric_results |
104 | end | 104 | end |
105 | 105 | ||
106 | -Given(/^I see a sample metric's name$/) do | 106 | +Given(/^I should see the sample metric's name$/) do |
107 | expect(page).to have_content(@metric_results.first.metric_configuration.metric.name) | 107 | expect(page).to have_content(@metric_results.first.metric_configuration.metric.name) |
108 | end | 108 | end |
109 | 109 |