@@ -20,28 +20,28 @@ describe('WindowThumbnailSettings', () => {
2020 it ( 'renders all elements correctly' , ( ) => {
2121 createWrapper ( ) ;
2222 expect ( screen . getByRole ( 'presentation' , { selector : 'li' } ) ) . toBeInTheDocument ( ) ;
23- expect ( screen . getByRole ( 'menuitem ' , { name : / O f f / } ) ) . toBeInTheDocument ( ) ;
24- expect ( screen . getByRole ( 'menuitem ' , { name : / B o t t o m / } ) ) . toBeInTheDocument ( ) ;
25- expect ( screen . getByRole ( 'menuitem ' , { name : / R i g h t / } ) ) . toBeInTheDocument ( ) ;
23+ expect ( screen . getByRole ( 'menuitemradio ' , { name : / O f f / } ) ) . toBeInTheDocument ( ) ;
24+ expect ( screen . getByRole ( 'menuitemradio ' , { name : / B o t t o m / } ) ) . toBeInTheDocument ( ) ;
25+ expect ( screen . getByRole ( 'menuitemradio ' , { name : / R i g h t / } ) ) . toBeInTheDocument ( ) ;
2626 } ) ;
2727 it ( 'for far-bottom it should set the correct label active (by setting the secondary color)' , ( ) => {
2828 createWrapper ( { thumbnailNavigationPosition : 'far-bottom' } ) ;
29- expect ( screen . getByRole ( 'menuitem ' , { name : / B o t t o m / } ) . querySelector ( 'svg' ) ) . toHaveClass ( 'MuiSvgIcon-colorSecondary' ) ; // eslint-disable-line testing-library/no-node-access
30- expect ( screen . getByRole ( 'menuitem ' , { name : / R i g h t / } ) . querySelector ( 'svg' ) ) . not . toHaveClass ( 'MuiSvgIcon-colorSecondary' ) ; // eslint-disable-line testing-library/no-node-access
31- expect ( screen . getByRole ( 'menuitem ' , { name : / O f f / } ) . querySelector ( 'svg' ) ) . not . toHaveClass ( 'MuiSvgIcon-colorSecondary' ) ; // eslint-disable-line testing-library/no-node-access
29+ expect ( screen . getByRole ( 'menuitemradio ' , { name : / B o t t o m / } ) . querySelector ( 'svg' ) ) . toHaveClass ( 'MuiSvgIcon-colorSecondary' ) ; // eslint-disable-line testing-library/no-node-access
30+ expect ( screen . getByRole ( 'menuitemradio ' , { name : / R i g h t / } ) . querySelector ( 'svg' ) ) . not . toHaveClass ( 'MuiSvgIcon-colorSecondary' ) ; // eslint-disable-line testing-library/no-node-access
31+ expect ( screen . getByRole ( 'menuitemradio ' , { name : / O f f / } ) . querySelector ( 'svg' ) ) . not . toHaveClass ( 'MuiSvgIcon-colorSecondary' ) ; // eslint-disable-line testing-library/no-node-access
3232 } ) ;
3333 it ( 'for far-right it should set the correct label active (by setting the secondary color)' , ( ) => {
3434 createWrapper ( { thumbnailNavigationPosition : 'far-right' } ) ;
35- expect ( screen . getByRole ( 'menuitem ' , { name : / R i g h t / } ) . querySelector ( 'svg' ) ) . toHaveClass ( 'MuiSvgIcon-colorSecondary' ) ; // eslint-disable-line testing-library/no-node-access
36- expect ( screen . getByRole ( 'menuitem ' , { name : / O f f / } ) . querySelector ( 'svg' ) ) . not . toHaveClass ( 'MuiSvgIcon-colorSecondary' ) ; // eslint-disable-line testing-library/no-node-access
37- expect ( screen . getByRole ( 'menuitem ' , { name : / B o t t o m / } ) . querySelector ( 'svg' ) ) . not . toHaveClass ( 'MuiSvgIcon-colorSecondary' ) ; // eslint-disable-line testing-library/no-node-access
35+ expect ( screen . getByRole ( 'menuitemradio ' , { name : / R i g h t / } ) . querySelector ( 'svg' ) ) . toHaveClass ( 'MuiSvgIcon-colorSecondary' ) ; // eslint-disable-line testing-library/no-node-access
36+ expect ( screen . getByRole ( 'menuitemradio ' , { name : / O f f / } ) . querySelector ( 'svg' ) ) . not . toHaveClass ( 'MuiSvgIcon-colorSecondary' ) ; // eslint-disable-line testing-library/no-node-access
37+ expect ( screen . getByRole ( 'menuitemradio ' , { name : / B o t t o m / } ) . querySelector ( 'svg' ) ) . not . toHaveClass ( 'MuiSvgIcon-colorSecondary' ) ; // eslint-disable-line testing-library/no-node-access
3838 } ) ;
3939
4040 it ( 'updates state when the thumbnail config selection changes' , async ( ) => {
4141 const setWindowThumbnailPosition = vi . fn ( ) ;
4242 const user = userEvent . setup ( ) ;
4343 createWrapper ( { setWindowThumbnailPosition } ) ;
44- const menuItems = screen . queryAllByRole ( 'menuitem ' ) ;
44+ const menuItems = screen . queryAllByRole ( 'menuitemradio ' ) ;
4545 expect ( menuItems . length ) . toBe ( 3 ) ;
4646 expect ( menuItems [ 0 ] ) . toBeInTheDocument ( ) ;
4747 expect ( menuItems [ 1 ] ) . toBeInTheDocument ( ) ;
@@ -57,6 +57,6 @@ describe('WindowThumbnailSettings', () => {
5757
5858 it ( 'when rtl flips an icon' , ( ) => {
5959 createWrapper ( { direction : 'rtl' } ) ;
60- expect ( screen . getByRole ( 'menuitem ' , { name : / R i g h t / } ) . querySelector ( 'svg' ) ) . toHaveStyle ( 'transform: rotate(180deg);' ) ; // eslint-disable-line testing-library/no-node-access
60+ expect ( screen . getByRole ( 'menuitemradio ' , { name : / R i g h t / } ) . querySelector ( 'svg' ) ) . toHaveStyle ( 'transform: rotate(180deg);' ) ; // eslint-disable-line testing-library/no-node-access
6161 } ) ;
6262} ) ;
0 commit comments