gkushang/cucumber-html-reporter

View on GitHub
templates/simple/features.html

Summary

Maintainability
Test Coverage
<% _.each(suite.features, function(feature) { %>
<div class="feature container">
  <h3 class="title"><span class="highlight"><%= feature.keyword %>: </span><%= feature.name %></h3>
   <% if (feature.description) { %><p><%= feature.description.replace(/\n/g, '<br />') %></p><% } %>
  <% _.each(feature.elements, function(element) { %>
    <div class="element container">
    <h3 class="title"><span class="highlight"><%= element.keyword %>: </span><%= element.name %></h3>
      <% _.each(element.steps, function(step) { %>
        <div class="step">
          <p>
            <% if(step.result) { %>
            <span class="text <%= step.result.status %>">
            <% } %>
            <span class="keyword highlight"><%= step.keyword %></span> <%- step.name %></span>
             <% if (step.text) { %>
                   <div class="error">
                     <br>
                     <%= step.text %>
                   </div>
             <% } %>
             <% if (step.image) { %>
                   <div class="step-screenshot-wrap">
                     <a class="toggle" href="#">Screenshot -</a>
                     <img class="screenshot" src="<%= step.image %>"/>
                   </div>
             <% } %>
             <% if (step.result.error_message) { %>
                   <pre class="step-error-message" id="danger"><%= step.result.error_message.replace(/</g, '(').replace(/>/g, ')') %></pre>
             <% } %>
          </p>
        </div>
      <% }); %>
    </div>
  <% }); %>
</div>
<% }); %>