From 9ce3cf3f5c9934d95e954d0697ea677f34805381 Mon Sep 17 00:00:00 2001 From: William Petit Date: Fri, 15 Oct 2021 13:05:32 +0200 Subject: [PATCH] =?UTF-8?q?Gestion=20des=20sous=20suites=20dans=20le=20tem?= =?UTF-8?q?plate=20par=20d=C3=A9faut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/junit2md/template/report.md.tmpl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/cmd/junit2md/template/report.md.tmpl b/cmd/junit2md/template/report.md.tmpl index b734bad..0101e97 100644 --- a/cmd/junit2md/template/report.md.tmpl +++ b/cmd/junit2md/template/report.md.tmpl @@ -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}} @@ -79,4 +76,14 @@ {{- if eq . "passed" -}}✓{{- end -}} {{- if or (eq . "error") (eq . "failed") -}}⨯{{- end -}} {{- if eq . "skipped" -}}⏩{{- end -}} +{{end}} + +{{define "suite"}} +{{- $suite := . }} +{{- range .Tests }} +| {{ template "status_icon" .Status }} | `{{ .Name }}` | `{{ $suite.Name }}` | +{{- end -}} +{{- range .Suites }} +{{- template "suite" . }} +{{- end -}} {{end}} \ No newline at end of file