]> source.dussan.org Git - sonarqube.git/commitdiff
do not display skipped unit tests when value is 0
authorsimonbrandhof <simon.brandhof@gmail.com>
Sun, 26 Dec 2010 18:03:15 +0000 (18:03 +0000)
committersimonbrandhof <simon.brandhof@gmail.com>
Sun, 26 Dec 2010 18:03:15 +0000 (18:03 +0000)
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/code_coverage.html.erb

index 3bab79d5aeb2552a1448a7628ac22a6c10bf85a4..afc6602ebaaeb5f6969eefbbf7fd1dd98b313c85 100644 (file)
           <%= dashboard_configuration.selected_period? ? format_variation(tests_measure) : trend_icon(tests_measure) -%>
         </p>
         <% skipped_measure=measure(Metric::SKIPPED_TESTS)
-           if skipped_measure
+           if dashboard_configuration.selected_period? || (skipped_measure && skipped_measure.value && skipped_measure.value>0)
         %>
         <p>
-          +<%= format_measure(skipped_measure, :suffix => ' skipped', :url => url_for_drilldown(Metric::SKIPPED_TESTS)) %>
+          +<%= format_measure(skipped_measure, :suffix => ' skipped', :url => url_for_drilldown(Metric::SKIPPED_TESTS), :default => '0') %>
           <%= dashboard_configuration.selected_period? ? format_variation(skipped_measure) : trend_icon(skipped_measure) -%>
         </p>
         <% end %>