diff --git a/markdown-templates/step-feedback/step-results-table.md b/markdown-templates/step-feedback/step-results-table.md index 876bd8a..b193e84 100644 --- a/markdown-templates/step-feedback/step-results-table.md +++ b/markdown-templates/step-feedback/step-results-table.md @@ -1,36 +1,39 @@ -{{#passed}} +{%- set all_passed = (results_table | selectattr("passed") | length) == (results_table | length) %} + +{%- if all_passed %} ## Step {{ step_number }} - Passed ✅ -{{/passed}} -{{^passed}} +{%- else %} ## Step {{ step_number }} - Fail ❌ -{{/passed}} +{%- endif %} -{{#passed}} +{%- if all_passed %} Inflatocat image indicating the step passed -{{/passed}} -{{^passed}} +{%- else %} + Spidertocat image indicating the step failed Some checks failed. Please review the results below and try again. Time to find the bug! 🤔 -{{/passed}} +{%- endif %} | Status | Description | -| --- | --- | -{{#results_table}} -| {{#passed}}✅ - Pass{{/passed}}{{^passed}}❌ - Fail{{/passed}} | {{ description }} | -{{/results_table}} +| ------ | ----------- | -{{#tips.length}} +{%- for row in results_table %} +| {% if row.passed -%}✅ - Pass{%- else -%}❌ - Fail{%- endif %} | {{ row.description }} | +{%- endfor %} + +{%- if tips and tips.length %} ### Tips -{{#tips}} +{%- for tip in tips %} + +- {{ tip }} + {%- endfor %} -- {{.}} - {{/tips}} - {{/tips.length}} +{%- endif %}