lib/cuukie/views/index.erb in cuukie-0.1.3 vs lib/cuukie/views/index.erb in cuukie-0.1.4
- old
+ new
@@ -6,19 +6,25 @@
<script type="text/javascript" src="cuukie.js"></script>
<title>Cuukie</title>
</head>
<body>
+ <!-- header -->
<div class="cucumber"><div id="cucumber-header"><div id="label"><h1>Cucumber Features</h1></div>
<div id="summary">
<p id="stats"></p>
<p id="duration"></p>
<div id="expand-collapse"><p id="expander">Expand All</p><p id="collapser">Collapse All</p></div>
</div>
</div>
-
<script><%= @build_status %>Colors('cucumber-header')</script>
+ <script type="text/javascript">
+ document.getElementById('duration').innerHTML = "Finished in <strong><%= @duration %> seconds</strong>";
+ </script>
+ <script type="text/javascript">
+ document.getElementById('stats').innerHTML = "<%= @stats[:scenarios] %><br/><%= @stats[:steps] %>";
+ </script>
<% @features.each do |feature| %>
<div class="feature">
<h2><span class="val">Feature: <%= feature['short_name'] %></span></h2>
<p class="narrative"><%= feature['description'].join '<br/>' %><bbr/r></p>
@@ -35,10 +41,15 @@
<li id="features_" class="step <%= step['status'] %>">
<div class="step_name">
<span class="keyword"><%= step['keyword'] %></span><span class="step val"><%= step['name'] %></span>
</div>
<div class="step_file"><span><%= step['file_colon_line'] %></span></div>
+ <% if step['exception'] %>
+ <div class="message"><pre><%= step['exception']['message'] %></pre></div>
+ <div class="backtrace"><pre><%= step['exception']['backtrace'].gsub('\n', '<br/>') %></pre></div>
+ <%= snippet step['exception'] %>
+ <% end %>
<% unless step['table'].empty? %>
<table>
<% step['table'].each_with_index do |rowdata, row| %>
<tr class='step' id='row_-<%= row %>'>
<% rowdata.each_with_index do |value, col| %>
@@ -56,14 +67,8 @@
</ol>
</div>
<% end %>
</div>
<% end %>
- <script type="text/javascript">
- document.getElementById('duration').innerHTML = "Finished in <strong><%= @duration %> seconds</strong>";
- </script>
- <script type="text/javascript">
- document.getElementById('stats').innerHTML = "<%= @stats[:scenarios] %><br/><%= @stats[:steps] %>";
- </script>
</div>
</body>
</html>
\ No newline at end of file