@@ -305,6 +305,8 @@ describe('SelectDialog', () => {
305305 } ) ;
306306
307307 it ( 'invisible messaging' , ( ) => {
308+ // do not remove content of ui5wc invisible message (disable `setTimeout` from running)
309+ cy . clock ( ) ;
308310 cy . mount (
309311 < SelectDialog open selectionMode = { ListSelectionMode . Multiple } >
310312 < ListItemStandard text = { 'ListItem 1' } data-testid = "1" />
@@ -313,14 +315,21 @@ describe('SelectDialog', () => {
313315 < ListItemStandard text = { 'ListItem 4' } data-testid = "4" />
314316 </ SelectDialog > ,
315317 ) ;
318+
319+ cy . get ( 'ui5-announcement-area .ui5-invisiblemessage-polite' ) . should ( 'exist' ) ;
316320 cy . findByTestId ( '1' ) . click ( ) ;
321+ cy . findByTestId ( '1' ) . should ( 'have.attr' , 'selected' ) ;
317322 cy . get ( 'ui5-announcement-area' ) . should ( 'contain.text' , 'Selected Items 1' ) ;
318323 cy . findByTestId ( '1' ) . click ( ) ;
319- cy . get ( 'ui5-announcement-area ') . should ( 'not.contain.text ' , 'Selected Items 1 ' ) ;
324+ cy . findByTestId ( '1 ') . should ( 'not.have.attr ' , 'selected ' ) ;
320325 cy . findByTestId ( '1' ) . click ( ) ;
326+ cy . findByTestId ( '1' ) . should ( 'have.attr' , 'selected' ) ;
321327 cy . findByTestId ( '2' ) . click ( ) ;
328+ cy . findByTestId ( '2' ) . should ( 'have.attr' , 'selected' ) ;
322329 cy . findByTestId ( '3' ) . click ( ) ;
330+ cy . findByTestId ( '3' ) . should ( 'have.attr' , 'selected' ) ;
323331 cy . findByTestId ( '4' ) . click ( ) ;
332+ cy . findByTestId ( '4' ) . should ( 'have.attr' , 'selected' ) ;
324333 cy . get ( 'ui5-announcement-area' ) . should ( 'contain.text' , 'Selected Items 4' ) ;
325334 } ) ;
326335} ) ;
0 commit comments