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 }}` || | {{ template "status_icon" .Status }} | `{{ .Name }}` ||
{{- end -}} {{- end -}}
{{- range .Suites }} {{- range .Suites }}
{{- $suite := . }} {{- template "suite" . -}}
{{- range .Tests }}
| {{ template "status_icon" .Status }} | `{{ .Name }}` | `{{ $suite.Name }}` |
{{- end -}}
{{end}} {{end}}
</details> </details>
@ -80,3 +77,13 @@
{{- if or (eq . "error") (eq . "failed") -}}&#10799;{{- end -}} {{- if or (eq . "error") (eq . "failed") -}}&#10799;{{- end -}}
{{- if eq . "skipped" -}}&#9193;{{- end -}} {{- if eq . "skipped" -}}&#9193;{{- end -}}
{{end}} {{end}}
{{define "suite"}}
{{- $suite := . }}
{{- range .Tests }}
| {{ template "status_icon" .Status }} | `{{ .Name }}` | `{{ $suite.Name }}` |
{{- end -}}
{{- range .Suites }}
{{- template "suite" . }}
{{- end -}}
{{end}}