Commit 8f05039291edf6117c197fa0ff0d110025241fc9
Committed by
Heitor
1 parent
07af10c2
Exists in
colab
and in
4 other branches
Complete HotspotMetricResult listing acceptance
It checks for the messages of the given HotspotMetricResults. This test may be broken if the used repository developer fix all the listed issues.
Showing
2 changed files
with
14 additions
and
2 deletions
Show diff stats
features/repository/show/hotspot_metric_results.feature
| ... | ... | @@ -3,7 +3,7 @@ Feature: Repository hotspot metric results |
| 3 | 3 | As a regular user |
| 4 | 4 | I should see the hotspot metric results list |
| 5 | 5 | |
| 6 | - @kalibro_configuration_restart @kalibro_processor_restart @javascript @wip | |
| 6 | + @kalibro_configuration_restart @kalibro_processor_restart @javascript | |
| 7 | 7 | Scenario: Should show the message when the graphic of the given metric has only a single point |
| 8 | 8 | Given I am a regular user |
| 9 | 9 | And I am signed in |
| ... | ... | @@ -17,7 +17,8 @@ Feature: Repository hotspot metric results |
| 17 | 17 | And I ask for the hotspot metric results of the given module result |
| 18 | 18 | When I visit the repository show page |
| 19 | 19 | And I click the "Hotspot Metric Results" h3 |
| 20 | - Then I should see a list of hotspot metric results | |
| 20 | + Then I should have at least one hotspot metric result | |
| 21 | + And I should see the hotspot metric results messages | |
| 21 | 22 | |
| 22 | 23 | @kalibro_configuration_restart @kalibro_processor_restart @javascript |
| 23 | 24 | Scenario: Should show the error message when the process fails | ... | ... |
features/step_definitions/repository_steps.rb
| ... | ... | @@ -223,3 +223,14 @@ end |
| 223 | 223 | Then(/^I should be at the Repositories index$/) do |
| 224 | 224 | expect(page.current_path).to end_with(repositories_path) # We use end_with in order to avoid the language route |
| 225 | 225 | end |
| 226 | + | |
| 227 | +Then(/^I should have at least one hotspot metric result$/) do | |
| 228 | + expect(@metric_results.count).to be > 0 | |
| 229 | +end | |
| 230 | + | |
| 231 | +Then(/^I should see the hotspot metric results messages$/) do | |
| 232 | + @metric_results.each do |metric_result| | |
| 233 | + expect(page).to have_content(metric_result.message) | |
| 234 | + end | |
| 235 | +end | |
| 236 | + | ... | ... |