{% from "./macros/case.html" import show_case %}

{% macro show_scenario(item) %}
  <li class="accordion-item status-{{ item.status }}" data-accordion-item>
    <a href="#" class="accordion-title">
      <span class="badge status-{{ item.status }}">{{ item.status }}</span>
      {{ item.label }}
    </a>
    <div class="accordion-content" data-tab-content>
      {% if item.message %}
        <pre>{{ item.message }}</pre>
      {% endif %}

      <ul class="accordion" data-accordion data-multi-expand="true" data-allow-all-closed="true">
        {% for case in item.case_results %}
          {{ show_case(case) }}
        {% endfor %}
      </ul>
    </div>
  </li>
{% endmacro %}
