{#- partials/step_card.html Renders a single step card. Context: step — dict with keys: result (str) PASS | FAIL | WARN | INFO | SKIP step_number (str/int) step_title (str) test_case_id (str) duration (float) dur_bar_width (int) pre-computed bar width 0-60px text (str, optional) description (str, optional) description_is_html (bool) is_json (bool) json_raw (object, optional) screenshot_html (str, optional) attachment_html (str, optional) http_status_code (int, optional) HTTP status code http_method (str, optional) GET/POST/PUT/etc. preview_text (str, optional) short preview (hidden when expanded) phase (str, optional) test phase label step_group (str, optional) step group label api_data (dict, optional) structured API data for tab rendering total_steps — int, total number of steps in this test case #} {%- set result_upper = step.result | upper -%} {%- set badge = badge_map(result_upper) -%} {%- set border_cls = border_map(result_upper) -%} {%- set step_id = step.test_case_id | default('unknown') ~ '-s' ~ step.step_number | default('unknown') -%} {%- set collapse_id = 'collapse-' ~ step.test_case_id | default('unknown') ~ '-' ~ step.step_number | default('unknown') -%} {%- set extra_cls = '' -%} {%- if result_upper == 'SKIP' %}{% set extra_cls = ' skip-hl' %}{% endif -%} {%- if result_upper == 'FAIL' and step.is_critical | default(false) %}{% set extra_cls = extra_cls ~ ' fail-hl' %}{% endif -%}
Text: {{ step.text }}
{%- endif %} {# #26 API data tabs — rendered when step has structured api_data dict #} {%- if step.api_data %} {%- set ad = step.api_data -%} {%- set uid = step.test_case_id | default('x') ~ step.step_number | default('0') -%} {#- kv summary row: Endpoint / Method / Status / Duration / Start / End -#} {%- if ad.url is defined and ad.url %}{{ ad.curl_command | e }}
Description:
{%- endif %} {%- endif %} {%- if step.screenshot_html %} {{ step.screenshot_html | safe }} {%- endif %} {%- if step.attachment_html %} {{ step.attachment_html | safe }} {%- endif %}