<table class="data width100 tests_viewer" id="test_data">
<thead>
<tr>
- <th class="thin"> </th>
<th class="thin"> </th>
<th class="thin right"><%= message('test_viewer.duration') -%></th>
<th><%= message('test_viewer.unit_test_name') -%></th>
failure = block.elements['failure']
block_message = !failure.nil? ? failure : block_message
%>
- <td class="thin" nowrap>
- <% if !block_message.nil? %>
- <a id="expandLink_<%= index -%>" href="#" onclick="expandTests(<%= index -%>);"><%= message('test_viewer.expand') -%></a>
- <a id="collapseLink_<%= index -%>" class="collapse" href="#" onclick="collapseTests(<%= index -%>);" style="display: none;"><%= message('test_viewer.collapse') -%></a>
- <% else %>
-
- <% end %>
- </td>
<td class="thin" nowrap>
<img id="test_status_<%= index -%>_<%= status -%>" src="<%= icon_url -%>" />
</td>
<td id="test_time_<%= index -%>" class="thin right" nowrap><%= block.attributes['time'] -%> ms</td>
<td>
- <span><%= block.attributes['name'] -%></span>
+ <span id="test_name_<%= index -%>">
+ <% name = block.attributes['name'] %>
+ <% if !block_message.nil? %>
+ <a id="test_expandLink_<%= index -%>" href="#" onclick="expandTests(<%= index -%>);"><%= name -%></a>
+ <a id="test_collapseLink_<%= index -%>" class="collapse" href="#" onclick="collapseTests(<%= index -%>);" style="display: none;"><%= name -%></a>
+ <% else %>
+ <%= name -%>
+ <% end %>
+ </span>
+
<% if !block_message.nil? %>
- <div id="message_<%= index -%>" class="message" style="display: none;">
+ <div id="test_message_<%= index -%>" class="message" style="display:none; margin-top:5px;">
<% message = block_message.attributes['message'] %>
<% if !message.nil? %>
<span><%= h message -%></span>
Functions used in tests viewer
*/
function expandTests(index){
- $j(".tests_viewer #collapseLink_"+ index).show();
- $j(".tests_viewer #expandLink_"+ index).hide();
- $j(".tests_viewer #message_"+ index).show();
+ $j(".tests_viewer #test_collapseLink_"+ index).show();
+ $j(".tests_viewer #test_expandLink_"+ index).hide();
+ $j(".tests_viewer #test_message_"+ index).show();
}
function collapseTests(index){
- $j(".tests_viewer #collapseLink_"+ index).hide();
- $j(".tests_viewer #expandLink_"+ index).show();
- $j(".tests_viewer #message_"+ index).hide();
+ $j(".tests_viewer #test_collapseLink_"+ index).hide();
+ $j(".tests_viewer #test_expandLink_"+ index).show();
+ $j(".tests_viewer #test_message_"+ index).hide();
}
\ No newline at end of file