编程测试加个results为空判断

This commit is contained in:
yuanke 2016-03-25 21:11:13 +08:00
parent a58ba8080c
commit ef49715b08
3 changed files with 7 additions and 2 deletions

View File

@ -55,8 +55,8 @@
<ul class="ProResultUl " >
<% test.results.reverse.each_with_index do |x, i| %>
<% unless x.nil? %>
<li >
<span class="w60 T_C">测试<%=test.results.size-i%></span>
<% if x["status"].to_i != 0 %>
<% if x["status"].to_i == 2 %>
@ -82,6 +82,7 @@
<div class="cl"></div>
<% end %>
</li>
<% end %>
<% end %>
</ul>
</div>

View File

@ -133,8 +133,9 @@
<% else %>
<div class="ProResultTable " >
<ul class="ProResultUl " >
<%puts test.results %>
<% logger.error("################################################{test.results}") %>
<% test.results.reverse.each_with_index do |x, i| %>
<% unless x.nil? %>
<li ><span class="w60 T_C">测试<%=test.results.size-i%></span>
<% if x["status"].to_i != 0 %>
<% if x["status"].to_i == 2 %>
@ -160,6 +161,7 @@
</li>
<% end %>
<% end %>
<% end %>
</ul>
</div>
<% end %>

View File

@ -101,6 +101,7 @@
<div class="ProResultTable " >
<ul class="ProResultUl " >
<% test.results.reverse.each_with_index do |x, i| %>
<% unless x.nil? %>
<li ><span class="w60 T_C">测试<%=test.results.size-i%></span>
<% if x["status"].to_i != 0 %>
<% if x["status"].to_i == 2 %>
@ -125,6 +126,7 @@
<div class="cl"></div>
</li>
<% end %>
<% end %>
<% end %>
</ul>
</div>