{% if test_results %}
{% if test_results.n_errors %}
A test job with id {{ test_results.job_id }} ran from {{ test_results.starttime }} until {{ test_results.endtime }} and there were {{ test_results.n_errors }} errors in total.
{% else %}
A test job with id {{ test_results.job_id }} ran from {{ test_results.starttime }} until {{ test_results.endtime }} and there were no errors.
{% endif %}
{% endif %}
{{ content.description }}
{% for test in content.children %}
{% if test_results %}
{% set test_result = test_results.results[test.name] %}
{% endif %}
{{ test.description }}
{% for scenario in test.children %}
{% if test_results %}
{% set scenario_result = test_result[scenario.name] %}
{% endif %}
{{ scenario.description }}
{% if scenario.children %}
{% for validation_group in scenario.children %}
{% if test_results %}
{% set valgroup_result = scenario_result[validation_group.name] %}
{% endif %}
{{ validation_group.description }}
{% for event in validation_group.children %}
{% if test_results %}
{% set event_results = valgroup_result[event.name] %}
{% endif %}
{{ event.description }}
{% if test_results %}
{% set all_ok=True %}
{% for event_result in event_results %}
{% if not event_result.ok %}
{% set all_ok=False %}
Test failed for browser {{ event_result.browser }}
{% for error in event_result.errors %}
{{ error|pretty_json|safe }}
{% endfor %}
{% if event_result.requests.matched %}
Click for matched requests
{% for r in event_result.requests.matched %}
{{r.method}} {{r.url}}
@ {{r.frame_url}}
{% if r.body %}
click for request body
{{ r.body|pretty_json|safe }}
{% endif %}
{% endfor %}
{% endif %}
{% if event_result.requests.unmatched %}
Click for unmatched requests
{% for r in event_result.requests.unmatched %}
{{r.method}} {{r.url}}
@ {{r.frame_url}}
{% if r.body %}
click for request body