Commit 223184021fba8b032a32aaff13ff3bc47d0f16c3

Authored by Heitor
1 parent 6ff23354

Fix show hotspot metric results feature

 * Now it is correctly checking for the names of the files in the
 repositories#show page

Signed off by: Diego Araújo <diegoamc90@gmail.com>
app/views/modules/_hotspot_metric_result.html.erb
1 <tr> 1 <tr>
  2 + <td><%= hotspot_metric_result.module_result.kalibro_module.short_name %></td>
2 <td><%= hotspot_metric_result.line_number %></td> 3 <td><%= hotspot_metric_result.line_number %></td>
3 <td><%= hotspot_metric_result.message %></td> 4 <td><%= hotspot_metric_result.message %></td>
4 </tr> 5 </tr>
app/views/modules/_hotspot_metric_results.html.erb
1 <table class="table table-hover metric_results"> 1 <table class="table table-hover metric_results">
2 <thead> 2 <thead>
3 <tr> 3 <tr>
  4 + <th><%= t('activemodel.attributes.hotspot_metric_result.module_result.module.name') %></th>
4 <th><%= t('activemodel.attributes.hotspot_metric_result.line') %></th> 5 <th><%= t('activemodel.attributes.hotspot_metric_result.line') %></th>
5 <th><%= t('activemodel.attributes.hotspot_metric_result.message') %></th> 6 <th><%= t('activemodel.attributes.hotspot_metric_result.message') %></th>
6 </tr> 7 </tr>
features/repository/show/hotspot_metric_results.feature
@@ -18,6 +18,7 @@ Feature: Repository hotspot metric results @@ -18,6 +18,7 @@ Feature: Repository hotspot metric results
18 When I visit the repository show page 18 When I visit the repository show page
19 And I click the "Hotspot Metric Results" h3 19 And I click the "Hotspot Metric Results" h3
20 Then I should have at least one hotspot metric result 20 Then I should have at least one hotspot metric result
  21 + And I should see the hotspot metric results file names
21 And I should see the hotspot metric results messages 22 And I should see the hotspot metric results messages
22 23
23 @kalibro_configuration_restart @kalibro_processor_restart @javascript 24 @kalibro_configuration_restart @kalibro_processor_restart @javascript
features/step_definitions/repository_steps.rb
@@ -234,3 +234,8 @@ Then(/^I should see the hotspot metric results messages$/) do @@ -234,3 +234,8 @@ Then(/^I should see the hotspot metric results messages$/) do
234 end 234 end
235 end 235 end
236 236
  237 +Then(/^I should see the hotspot metric results file names$/) do
  238 + @metric_results.each do |metric_result|
  239 + expect(page).to have_content(metric_result.module_result.kalibro_module.short_name)
  240 + end
  241 +end