@@ -492,13 +492,26 @@ test('should render the About section and version_string, sha or build_number wh
492
492
} ) ;
493
493
userEvent . hover ( screen . getByText ( 'Settings' ) ) ;
494
494
const about = await screen . findByText ( 'About' ) ;
495
- const version = await screen . findAllByText ( `Version: ${ version_string } ` ) ;
496
- const sha = await screen . findAllByText ( `SHA: ${ version_sha } ` ) ;
497
- const build = await screen . findAllByText ( `Build: ${ build_number } ` ) ;
495
+
496
+ // The version information is rendered as combined text in a single element
497
+ // Use getAllByText to get all matching elements and check the first one
498
+ const versionTexts = await screen . findAllByText (
499
+ ( _ , element ) =>
500
+ element ?. textContent ?. includes ( `Version: ${ version_string } ` ) ?? false ,
501
+ ) ;
502
+ const shaTexts = await screen . findAllByText (
503
+ ( _ , element ) =>
504
+ element ?. textContent ?. includes ( `SHA: ${ version_sha } ` ) ?? false ,
505
+ ) ;
506
+ const buildTexts = await screen . findAllByText (
507
+ ( _ , element ) =>
508
+ element ?. textContent ?. includes ( `Build: ${ build_number } ` ) ?? false ,
509
+ ) ;
510
+
498
511
expect ( about ) . toBeInTheDocument ( ) ;
499
- expect ( version [ 0 ] ) . toBeInTheDocument ( ) ;
500
- expect ( sha [ 0 ] ) . toBeInTheDocument ( ) ;
501
- expect ( build [ 0 ] ) . toBeInTheDocument ( ) ;
512
+ expect ( versionTexts [ 0 ] ) . toBeInTheDocument ( ) ;
513
+ expect ( shaTexts [ 0 ] ) . toBeInTheDocument ( ) ;
514
+ expect ( buildTexts [ 0 ] ) . toBeInTheDocument ( ) ;
502
515
} ) ;
503
516
504
517
test ( 'should render the Documentation link when available' , async ( ) => {
0 commit comments