<td id="test_time_<%= index -%>" class="thin right" nowrap><%= test_case[:time] -%> ms</td>
<% if has_covered_lines %>
<td id="test_covered_lines_<%= index -%>" class="thin right" nowrap>
- <a id="test_covered_lines_link_<%= index -%>" href="<%= ApplicationController.root_context -%>/test/testcase/?sid=<%= @snapshot.id -%>&test=<%= test_case[:name] -%>"
+ <a id="test_covered_lines_link_<%= index -%>" href="<%= ApplicationController.root_context -%>/test/testcase/<%= h @snapshot.resource.key -%>?test=<%= test_case[:name] -%>"
onclick="openAccordionItem(this.href, this); return false;"><%= number_with_precision(test_case[:covered_lines], :precision => 0) -%>
</a>
</td>
def testcase
verify_ajax_request
- require_parameters :sid, :test
- snapshot_id = params[:sid].to_i
+ require_parameters :id, :test
+ component_key = params[:id].to_s
@test = params[:test].to_s
- @test_plan = java_facade.testPlan(snapshot_id)
+ @test_plan = java_facade.testPlan(component_key)
+
@test_case = @test_plan.testCasesByName(@test).first
render :partial => 'test/testcase'
end
def testable
verify_ajax_request
- require_parameters :sid, :line
- snapshot_id = params[:sid].to_i
+ require_parameters :id, :line
+ component_key = params[:id].to_s
@line = params[:line].to_i
- @testable = java_facade.testable(snapshot_id)
+ @testable = java_facade.testable(component_key)
@test_case_by_test_plan = {}
@testable.testCasesOfLine(@line).each do |test_case|
test_plan = test_case.testPlan
<% if line.highlighted? %>
<td class="ind <%= hits_status -%>" title="<%= message('coverage_viewer.line_covered_by_x_tests', {:params => line.covered_lines.to_s}) if line.covered_lines > 0 -%>">
<% if line.covered_lines > 0 %>
- <a href="<%= ApplicationController.root_context -%>/test/testable/?sid=<%= @snapshot.id -%>&line=<%= index+1 -%>"
+ <a href="<%= ApplicationController.root_context -%>/test/testable/<%= h @snapshot.resource.key -%>?line=<%= index+1 -%>"
onclick="openAccordionItem(this.href, this); return false;"><%= line.covered_lines -%></a>
<% end %>
</td>
<% @test_case_by_test_plan.sort_by { |test_plan, test_cases| test_plan.component.longName }.each do |test_plan, test_cases| %>
<div class="source_title">
<% resource_key = test_plan.component.key %>
- <a href="<%= ApplicationController.root_context -%>/resource/index/<%= resource_key -%>?display_title=true&tab=source"
- onclick="openAccordionItem(this.href, this); return false;"><%= test_plan.component.longName %>
+ <a href="<%= ApplicationController.root_context -%>/resource/index/<%= h resource_key -%>?display_title=true&tab=source"
+ onclick="openAccordionItem(this.href, this); return false;"><%= h test_plan.component.longName %>
</a>
</div>
<table class="data marginbottom10">
</td>
<td class="thin right" nowrap><%= test_case.durationInMs -%> ms</td>
<td>
- <%= test_case.name -%>
+ <a href="<%= ApplicationController.root_context -%>/test/testcase/<%= h resource_key -%>?test=<%= test_case.name -%>"
+ onclick="openAccordionItem(this.href, this); return false;"><%= h test_case.name -%>
+ </a>
</td>
</tr>
<% end %>
<tr class="<%= cycle("even", "odd") -%>">
<td><%= cover.lines.size -%></td>
<td>
- <a href="<%= ApplicationController.root_context -%>/resource/index/<%= cover.testable.component.key -%>?display_title=true&tab=coverage&coverage_filter=lines_covered_per_test&test_case_filter=<%= @test -%>"
- onclick="openAccordionItem(this.href, this); return false;"><%= cover.testable.component.longName -%>
+ <a href="<%= ApplicationController.root_context -%>/resource/index/<%= h cover.testable.component.key -%>?display_title=true&tab=coverage&coverage_filter=lines_covered_per_test&test_case_filter=<%= @test -%>"
+ onclick="openAccordionItem(this.href, this); return false;"><%= h cover.testable.component.longName -%>
</a>
</td>
</tr>