@@ -9,13 +9,22 @@ 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
+
17
+ const passedHeader = hasPassed ? ( hasFailed ? 'Passed ☑️' : 'Passed ✅' ) : 'Passed'
18
+ const skippedHeader = hasSkipped ? 'Skipped ⚠️' : 'Skipped'
19
+ const failedHeader = hasFailed ? 'Failed ❌️' : 'Failed'
20
+
12
21
const table : SummaryTableRow [ ] = [
13
22
[
14
23
{ data : '' , header : true } ,
15
24
{ data : 'Tests' , header : true } ,
16
- { data : 'Passed ✅' , header : true } ,
17
- { data : 'Skipped ⏭️' , header : true } ,
18
- { data : 'Failed ❌' , header : true }
25
+ { data : passedHeader , header : true } ,
26
+ { data : skippedHeader , header : true } ,
27
+ { data : failedHeader , header : true }
19
28
]
20
29
]
21
30
@@ -68,7 +77,7 @@ export function buildSummaryTables(
68
77
annotation . status === 'success'
69
78
? '✅ pass'
70
79
: annotation . status === 'skipped'
71
- ? `⏭️ skipped`
80
+ ? `⚠️️ skipped`
72
81
: `❌ ${ annotation . annotation_level } `
73
82
} `
74
83
] )
@@ -111,7 +120,7 @@ function appendDetailsTable(
111
120
annotation . status === 'success'
112
121
? '✅ pass'
113
122
: annotation . status === 'skipped'
114
- ? `⏭️ skipped`
123
+ ? `⚠️️ skipped`
115
124
: `❌ ${ annotation . annotation_level } `
116
125
} `
117
126
] )
0 commit comments