{% comment %}
Renders expected/actual values for an assertion using pills (lists), tables (dicts), or plain text.
Variables: a (required) — assertion dict with expected, actual, expected_items, actual_items, expected_entries, actual_entries
{% endcomment %}
Expected
{% if a.expected_items %}
{% for item in a.expected_items %}
{{ item }}
{% endfor %}
{% elif a.expected_entries %}
| Parameter | Value |
{% for entry in a.expected_entries %}
| {{ entry.param }} |
{{ entry.value }} |
{% endfor %}
{% else %}
{{ a.expected }}
{% endif %}
Actual
{% if a.actual_items %}
{% for item in a.actual_items %}
{{ item }}
{% endfor %}
{% elif a.actual_entries %}
| Parameter | Value |
{% for entry in a.actual_entries %}
| {{ entry.param }} |
{{ entry.value }} |
{% endfor %}
{% else %}
{{ a.actual }}
{% endif %}