{% extends "layout.html" %}
{% block nav %}
    <nav class="navbar navbar-expand-lg navbar-light bg-light sticky-top">
        <div class="container-fluid">
          <a class="navbar-brand" href="#">Index HTML Test Report</a>
            <div class="collapse navbar-collapse">
              <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
                <li class="nav-item active">
                  <a class="nav-link" href="flat.html" title="go to all report">Flat</a>
                </li>
              </ul>
            </div>
        </div>
    </nav>
{% endblock %}
{% block content %}
    <table class="table table-hover datatable">
        <thead>
            <tr class="align-text-top">
                <th class="text-center">Started at</th>
                <th>Feature</th>
                <th class="text-center">Total<br/>{{ grand_totals['total_scenarios'] }}</th>
                <th class="text-center">Passed<br/>{{ grand_totals['total_scenarios_passed'] }}</th>
                <th class="text-center">Failed<br/>{{ grand_totals['total_scenarios_failed'] }}</th>
                <th class="text-center">Skipped<br/>{{ grand_totals['total_scenarios_skipped'] }}</th>
                <th class="text-center">Errored<br/>{{ grand_totals['total_scenarios_errored'] }}</th>
                <th class="text-center">Status<br/>&nbsp;</th>
                <th class="text-center">Duration (s)<br/>{{ '{:.3f}'.format(grand_totals['duration']) }}s</th>
            </tr>
        </thead>
        {% for feature in features %}
        <tr>
            <td class="text-center">{{ feature['started_at'] }}</td>
            <td><a href="{{ urlencode(escape(feature['name'])) }}.html">{{ escape(feature['name']) }}</a></td>
            <td class="text-center">{{ feature['total_scenarios'] }}</td>
            <td class="text-center">{{ feature['total_scenarios_passed'] }}</td>
            <td class="text-center">{{ feature['total_scenarios_failed'] }}</td>
            <td class="text-center">{{ feature['total_scenarios_skipped'] }}</td>
            <td class="text-center">{{ feature['total_scenarios_errored'] }}</td>
            <td class="text-center"><span class="status-{{ feature['status'] }}">{{ feature['status'] }}</span></td>
            <td class="text-center">{{ feature['duration'] }}</td>
        </tr>
        {% endfor %}
    </table>

    <script>
    setupReportTables([[6, 'asc']], [{type: 'timestamp', searchable: false}, {type: 'string'}, {type: 'num', searchable: false}, {type: 'num', searchable: false}, {type: 'num', searchable: false}, {type: 'num', searchable: false}, {type: 'num', searchable: false}, {type: 'html'} , {type: 'timestamp', searchable: false} ])
    </script>
{% endblock %}
