From 7d97a938d4a493b182752fdaa4df5c21e9689591 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Wed, 6 Feb 2013 11:26:33 +0100 Subject: [PATCH] Move test icon files and fix issue when displaying Tests covering file --- .../sonar/plugins/core/web/tests_viewer.html.erb | 2 +- .../WEB-INF/app/controllers/resource_controller.rb | 2 +- .../WEB-INF/app/views/resource/_options.html.erb | 2 +- .../app/views/test/_testable_working_view.erb | 2 +- .../images/{tests/error.png => test/ERROR.png} | Bin .../main/webapp/images/{tests => test}/FAILURE.png | Bin .../webapp/images/{tests/ok.png => test/OK.png} | Bin .../main/webapp/images/{tests => test}/SKIPPED.png | Bin .../src/main/webapp/javascripts/application.js | 1 + 9 files changed, 5 insertions(+), 4 deletions(-) rename sonar-server/src/main/webapp/images/{tests/error.png => test/ERROR.png} (100%) rename sonar-server/src/main/webapp/images/{tests => test}/FAILURE.png (100%) rename sonar-server/src/main/webapp/images/{tests/ok.png => test/OK.png} (100%) rename sonar-server/src/main/webapp/images/{tests => test}/SKIPPED.png (100%) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/web/tests_viewer.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/web/tests_viewer.html.erb index 87fd4234f8f..d2363619405 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/web/tests_viewer.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/web/tests_viewer.html.erb @@ -91,7 +91,7 @@ %> testdata_<%= index -%>" display="table-row"> - "/> + "/> <%= test_case[:time] -%> ms <% if has_covered_lines %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb index 4fb0999f00f..cf3cfdf83af 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb @@ -272,7 +272,7 @@ class ResourceController < ApplicationController end if @test_case_filter - test_case = @testable.testCaseByKey(@test_case_filter) + test_case = @testable.testCaseByName(@test_case_filter) lines = @testable.coverOfTestCase(test_case).lines filter_lines { |line| lines.include?(line.index) && line.after(to) } else diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb index c434f409d96..76131b76ba6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb @@ -100,7 +100,7 @@ <% @test_case_by_test_plan.sort_by{|test_plan, test_cases| test_plan.component.longName}.each do |test_plan, test_cases| %> <% test_cases.sort_by{|test_case| test_case.name}.each do |test_case| %> - + <% end %> <% end %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.erb index 7254910a470..75099b9c011 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.erb @@ -20,7 +20,7 @@ <% test_cases.sort_by{|test_case| test_case.name}.each do |test_case| %> "> - "/> + "/> <%= test_case.durationInMs -%> ms diff --git a/sonar-server/src/main/webapp/images/tests/error.png b/sonar-server/src/main/webapp/images/test/ERROR.png similarity index 100% rename from sonar-server/src/main/webapp/images/tests/error.png rename to sonar-server/src/main/webapp/images/test/ERROR.png diff --git a/sonar-server/src/main/webapp/images/tests/FAILURE.png b/sonar-server/src/main/webapp/images/test/FAILURE.png similarity index 100% rename from sonar-server/src/main/webapp/images/tests/FAILURE.png rename to sonar-server/src/main/webapp/images/test/FAILURE.png diff --git a/sonar-server/src/main/webapp/images/tests/ok.png b/sonar-server/src/main/webapp/images/test/OK.png similarity index 100% rename from sonar-server/src/main/webapp/images/tests/ok.png rename to sonar-server/src/main/webapp/images/test/OK.png diff --git a/sonar-server/src/main/webapp/images/tests/SKIPPED.png b/sonar-server/src/main/webapp/images/test/SKIPPED.png similarity index 100% rename from sonar-server/src/main/webapp/images/tests/SKIPPED.png rename to sonar-server/src/main/webapp/images/test/SKIPPED.png diff --git a/sonar-server/src/main/webapp/javascripts/application.js b/sonar-server/src/main/webapp/javascripts/application.js index 1449466ba84..54180770644 100644 --- a/sonar-server/src/main/webapp/javascripts/application.js +++ b/sonar-server/src/main/webapp/javascripts/application.js @@ -330,6 +330,7 @@ function openAccordionItem(url, elt, updateCurrentElement) { // Display loading image var loading = new Image(); loading.src = baseUrl + "/images/loading.gif"; + loading.className = 'accordion-loading'; if (currentElement.length) { var elementToRemove = currentElement.nextAll('.'+ htmlClass); -- 2.39.5