Sha256: df82f96e856831a18001a0ab42cf008fae47e0a3bcec3ece2dfb6390de544daf

Contents?: true

Size: 1.92 KB

Versions: 5

Compression:

Stored size: 1.92 KB

Contents

<% sc = 0 %>
<% @scenario.examples.each_with_index do |example, example_index| %>
  <% example.data.each_with_index do |row, row_index| %>
    <div style="display: none;" class="steps <%= "example#{example_index + 1}-#{row_index +1}" %>">
      <% scenario = @scenario.scenarios[sc] %>
      <% @scenario_outline = @scenario ; @scenario = scenario ; @steps = scenario.steps %>
      <%= erb(:steps) %>
      <% @scenario = @scenario_outline %>
      <% sc += 1 %>
    </div>
  <% end %>
<% end %>

<div class="outline">
  <% if @scenario.examples? %>
    <% @scenario.examples.each_with_index do |example,example_index| %>
      <div class="keyword">
        <%= h example.keyword %><%= example.name != "" ? ':' : '' %>
      </div>
      <div class="example-group-name"><%= h example.name %></div>
      <br style="clear: both;"/>
      <table>
        <thead>
          <tr>
            <% example.headers.each_with_index do |header,header_index| %>
              <th><%= h(header) %></th>
            <% end %>
          </tr>
        </thead>
        <% unless example.data.empty? %>
          <% example.data.each_with_index do |row,row_index| %>
          <tr class="<%= (row_index + 1) % 2 == 0 ? "even example#{example_index+1}-#{row_index +1}" : "odd example#{example_index+1}-#{row_index +1}" %>">
            <% row.each_with_index do |column,column_index| %>
              <td><%= h(column.to_s.strip) %></td>
            <% end %>
          </tr>
          <% end %>
        <% else %>
          <!-- Scenario Outline example table is empty -->
          <tr class="odd">
            <td colspan="<%= example.headers.length %>" style="text-align: center;">
              No Examples Defined
            </td>
          </tr>
        <% end %>
      </table>
    <% end  %>
  <% else %>
  <div class="keyword">No Example Table Defined</div>
  <div class="keyword suggestion developer">[!] Did you mean to create a Scenario?</div>
  <% end %>
</div>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
yard-lucid-0.5.0 lib/templates/default/feature/html/outline.erb
yard-lucid-0.4.0 lib/templates/default/feature/html/outline.erb
yard-lucid-0.3.0 lib/templates/default/feature/html/outline.erb
yard-lucid-0.2.0 lib/templates/default/feature/html/outline.erb
yard-lucid-0.1.0 lib/templates/default/feature/html/outline.erb