Commit 70a04eb84ab5170ecd13315e6e4e2ea218b4958a

Authored by Heitor
1 parent 12ffc237

Fix hotspot metric results showing in the wrong h3

 * Also the previous conditional in the view was unnecessary because the
 kalibro_ranges method never returns nil, at most it returns an empty
 array, which is checked by another conditional in the same view

Signed off by: Eduardo Araújo <duduktamg@hotmail.com>
app/views/modules/_metric_result.html.erb
1 <% metric_configuration = metric_result.metric_configuration %> 1 <% metric_configuration = metric_result.metric_configuration %>
2 -<% unless metric_configuration.kalibro_ranges.nil? %> 2 +<% unless metric_configuration.metric.type == "HotspotMetricSnapshot" %>
3 <% range_snapshot = find_range_snapshot(metric_result) 3 <% range_snapshot = find_range_snapshot(metric_result)
4 metric_name = metric_configuration.metric.name 4 metric_name = metric_configuration.metric.name
5 %> 5 %>
features/repository/show/hotspot_metric_results.feature
@@ -3,7 +3,7 @@ Feature: Repository hotspot metric results @@ -3,7 +3,7 @@ Feature: Repository hotspot metric results
3 As a regular user 3 As a regular user
4 I should see the hotspot metric results list 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 Scenario: Should show the message when the graphic of the given metric has only a single point 7 Scenario: Should show the message when the graphic of the given metric has only a single point
8 Given I am a regular user 8 Given I am a regular user
9 And I am signed in 9 And I am signed in
@@ -26,6 +26,8 @@ Feature: Repository hotspot metric results @@ -26,6 +26,8 @@ Feature: Repository hotspot metric results
26 Then I should have at least one hotspot metric result 26 Then I should have at least one hotspot metric result
27 And I should see the hotspot metric results file names 27 And I should see the hotspot metric results file names
28 And I should see the hotspot metric results messages 28 And I should see the hotspot metric results messages
  29 + When I click the "Tree Metric Results" h3
  30 + Then I should not see "Duplicate Code"
29 31
30 @kalibro_configuration_restart @kalibro_processor_restart @javascript 32 @kalibro_configuration_restart @kalibro_processor_restart @javascript
31 Scenario: Should show the error message when the process fails 33 Scenario: Should show the error message when the process fails