<% if (element.description) { %>
<%=
element.description.trim().replace(/\n/g, '
') %>
<% } %>
<% _.each(element.steps, function(step, stepIndex) { %>
<% if(!step.hidden || step.image || step.text || step.result.status === 'failed') { %>
<% if(step.result) { %>
<% if(step.result.status === 'passed') { %>
<% } else if(step.result.status === 'failed') { %>
<% } else if(step.result.status === 'skipped') { %>
<% } else if(step.result.status === 'ambiguous') { %>
<% } else if(step.result.status === 'pending') { %>
<% } else { %>
<% } %>
<% } %>
<%= step.keyword %>
<%- step.name %>
<% if (step.doc_string && step.doc_string.value) { %>
<%- step.doc_string.value %>
<% } %>
<% if (step.result) { %>
<%= calculateDuration(step.result.duration) %>
<% } %>
<% if(step.arguments) { %>
<% for( var i = 0; i < step.arguments.length; i++ ) { %>
<% if(step.arguments[i]["rows"]) { %>
<% } %>
<% if(step.arguments[i]["content"]) { %>
<%= step.arguments[i]["content"].replace(//g, ')') %>
<% } %>
<% } %>
<% } %>
<% if(step.rows) { %>
<% var headers = step.rows[0]["cells"] %>
<% } %>
<% if(step.result) { %>
<% if(step.result.status === 'undefined') { %>
Then(/^<%= step.name.replace(/"[^"]*"/g, '"\(\[\^\"\]\*\)"') %>$/, function(<% for (var i=1; i<(step.name.split('"').length / 2); i++) { %>arg<%= i %>, <% } %>callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
<% } %>
<% if (step.result.error_message) { %>
Show Error +
<%= step.result.error_message.replace(//g, ')') %>
<%= step.result.error_message.replace(//g, ')') %>
<% } %>
<% if (step.text) { %>
Show Info +
<% } %>
<% if (step.image) { %>
Screenshot +
<% } %>
<% } %>
<% } %>
<% }); %>