From 3ab38aeb1bc05dd3cdd02f5254e1abe380571fb7 Mon Sep 17 00:00:00 2001 From: Onsi Fakhouri Date: Fri, 18 Nov 2022 19:14:00 -0700 Subject: [PATCH] skipped tests only show as 'S' when running with -v --- reporters/default_reporter.go | 6 +++--- reporters/default_reporter_test.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/reporters/default_reporter.go b/reporters/default_reporter.go index b4a0a226a..7a27220ca 100644 --- a/reporters/default_reporter.go +++ b/reporters/default_reporter.go @@ -223,7 +223,7 @@ func (r *DefaultReporter) DidRun(report types.SpecReport) { showSeparateStdSection := inParallel && (report.CapturedStdOutErr != "") // given all that - do we have any actual content to show? or are we a single denoter in a stream? - reportHasContent := v.GTE(types.VerbosityLevelVerbose) || showTimeline || showSeparateVisibilityAlwaysReportsSection || showSeparateStdSection || report.Failed() + reportHasContent := v.Is(types.VerbosityLevelVeryVerbose) || showTimeline || showSeparateVisibilityAlwaysReportsSection || showSeparateStdSection || report.Failed() || (v.Is(types.VerbosityLevelVerbose) && !report.State.Is(types.SpecStateSkipped)) // should we show a runtime? includeRuntime := !report.State.Is(types.SpecStateSkipped|types.SpecStatePending) || (report.State.Is(types.SpecStateSkipped) && report.Failure.Message != "") @@ -249,8 +249,8 @@ func (r *DefaultReporter) DidRun(report types.SpecReport) { } case types.SpecStateSkipped: header = "S" - if v.GTE(types.VerbosityLevelVerbose) { - header = "S [SKIPPED]" + if v.Is(types.VerbosityLevelVeryVerbose) || (v.Is(types.VerbosityLevelVerbose) && report.Failure.Message != "") { + header, reportHasContent = "S [SKIPPED]", true } default: header = fmt.Sprintf("%s [%s]", header, r.humanReadableState(report.State)) diff --git a/reporters/default_reporter_test.go b/reporters/default_reporter_test.go index bce59d590..056546430 100644 --- a/reporters/default_reporter_test.go +++ b/reporters/default_reporter_test.go @@ -854,15 +854,15 @@ var _ = Describe("DefaultReporter", func() { // Skipped tests Entry("a skipped test", S(types.NodeTypeIt, "A", types.SpecStateSkipped, cl0), - Case(Succinct, Normal, Succinct|Parallel, Normal|Parallel, + Case(Succinct, Normal, Succinct|Parallel, Normal|Parallel, Verbose, Verbose|Parallel, "{{cyan}}S{{/}}"), - Case(Verbose, VeryVerbose, + Case(VeryVerbose, "{{cyan}}S [SKIPPED]{{/}}", "{{cyan}}{{bold}}A{{/}}", "{{gray}}cl0.go:12{{/}}", DELIMITER, ""), - Case(Verbose|Parallel, VeryVerbose|Parallel, + Case(VeryVerbose|Parallel, DELIMITER, "{{cyan}}S [SKIPPED]{{/}}", "{{cyan}}{{bold}}A{{/}}",