File tree Expand file tree Collapse file tree
static/new-ui/features/suites/components/TestStatusBar Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ export class StaticReportBuilder {
132132 if ( typeof this . _reporterConfig . generateBadges === 'function' && testResultWithImagePaths . attachments ) {
133133 testResultWithImagePaths . attachments . push ( {
134134 type : AttachmentType . Badges ,
135- list : this . _reporterConfig . generateBadges ( testResultWithImagePaths ) ?. filter ( ( badge ) => badge && badge . title ) as Badge [ ]
135+ list : this . _reporterConfig . generateBadges ( testResultWithImagePaths ) ?. filter ( ( badge ) : badge is Badge => Boolean ( badge && badge . title ) )
136136 } ) ;
137137 }
138138
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export const TestStatusBar = (): ReactNode => {
4343 { getSuiteDuration ( suite ) }
4444 </ div >
4545 </ div >
46- { ( badges && badges . list . length > 0 ) && (
46+ { ( badges ?. list && badges . list . length > 0 ) && (
4747 < div className = { styles [ 'test-status-bar__badges' ] } data-qa = "suite-badges" >
4848 { badges . list . map ( ( badge : BadgeType ) => (
4949 < Badge
Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ export interface SnapshotAttachment {
338338
339339export interface BadgesAttachment {
340340 type : AttachmentType . Badges ;
341- list : Badge [ ] ;
341+ list ? : Badge [ ] ;
342342}
343343
344344export interface TagsAttachment {
You can’t perform that action at this time.
0 commit comments