Gestion des sous suites dans le template par défaut

This commit is contained in:
wpetit 2021-10-15 13:05:32 +02:00
parent 9d84cfbd09
commit 9ce3cf3f5c
1 changed files with 11 additions and 4 deletions

View File

@ -22,10 +22,7 @@
| {{ template "status_icon" .Status }} | `{{ .Name }}` ||
{{- end -}}
{{- range .Suites }}
{{- $suite := . }}
{{- range .Tests }}
| {{ template "status_icon" .Status }} | `{{ .Name }}` | `{{ $suite.Name }}` |
{{- end -}}
{{- template "suite" . -}}
{{end}}
</details>
@ -79,4 +76,14 @@
{{- if eq . "passed" -}}&#10003;{{- end -}}
{{- if or (eq . "error") (eq . "failed") -}}&#10799;{{- end -}}
{{- if eq . "skipped" -}}&#9193;{{- end -}}
{{end}}
{{define "suite"}}
{{- $suite := . }}
{{- range .Tests }}
| {{ template "status_icon" .Status }} | `{{ .Name }}` | `{{ $suite.Name }}` |
{{- end -}}
{{- range .Suites }}
{{- template "suite" . }}
{{- end -}}
{{end}}