@@ -9,13 +9,23 @@ export function buildSummaryTables(
9
9
flakySummary : boolean ,
10
10
groupSuite = false
11
11
) : [ SummaryTableRow [ ] , SummaryTableRow [ ] , SummaryTableRow [ ] ] {
12
+ // only include a warning icon if there are skipped tests
13
+ const hasPassed = testResults . some ( testResult => testResult . passed > 0 )
14
+ const hasSkipped = testResults . some ( testResult => testResult . skipped > 0 )
15
+ const hasFailed = testResults . some ( testResult => testResult . failed > 0 )
16
+ const hasTests = testResults . some ( testResult => testResult . totalCount > 0 )
17
+
18
+ const passedHeader = hasTests ? ( hasPassed ? ( hasFailed ? 'Passed ☑️' : 'Passed ✅' ) : 'Passed' ) : 'Passed ❌️'
19
+ const skippedHeader = hasSkipped ? 'Skipped ⚠️' : 'Skipped'
20
+ const failedHeader = hasFailed ? 'Failed ❌️' : 'Failed'
21
+
12
22
const table : SummaryTableRow [ ] = [
13
23
[
14
24
{ data : '' , header : true } ,
15
25
{ data : 'Tests' , header : true } ,
16
- { data : 'Passed ✅' , header : true } ,
17
- { data : 'Skipped ⏭️' , header : true } ,
18
- { data : 'Failed ❌' , header : true }
26
+ { data : passedHeader , header : true } ,
27
+ { data : skippedHeader , header : true } ,
28
+ { data : failedHeader , header : true }
19
29
]
20
30
]
21
31
@@ -68,7 +78,7 @@ export function buildSummaryTables(
68
78
annotation . status === 'success'
69
79
? '✅ pass'
70
80
: annotation . status === 'skipped'
71
- ? `⏭️ skipped`
81
+ ? `⚠️️ skipped`
72
82
: `❌ ${ annotation . annotation_level } `
73
83
} `
74
84
] )
@@ -111,7 +121,7 @@ function appendDetailsTable(
111
121
annotation . status === 'success'
112
122
? '✅ pass'
113
123
: annotation . status === 'skipped'
114
- ? `⏭️ skipped`
124
+ ? `⚠️️ skipped`
115
125
: `❌ ${ annotation . annotation_level } `
116
126
} `
117
127
] )
0 commit comments