@@ -442,10 +442,10 @@ describe("<UserInfo />", () => {
442
442
} ) ;
443
443
444
444
// there should now be a button with the non-dehydrated device ID
445
- expect ( screen . getByRole ( "button" , { description : "d1 " } ) ) . toBeInTheDocument ( ) ;
445
+ expect ( screen . getByRole ( "button" , { name : "my device " } ) ) . toBeInTheDocument ( ) ;
446
446
447
447
// but not for the dehydrated device ID
448
- expect ( screen . queryByRole ( "button" , { description : "d2 " } ) ) . not . toBeInTheDocument ( ) ;
448
+ expect ( screen . queryByRole ( "button" , { name : "dehydrated device " } ) ) . not . toBeInTheDocument ( ) ;
449
449
450
450
// there should be a line saying that the user has "Offline device" enabled
451
451
expect ( screen . getByText ( "Offline device enabled" ) ) . toBeInTheDocument ( ) ;
@@ -528,7 +528,7 @@ describe("<UserInfo />", () => {
528
528
529
529
// the dehydrated device should be shown as an unverified device, which means
530
530
// there should now be a button with the device id ...
531
- const deviceButton = screen . getByRole ( "button" , { description : "d2 " } ) ;
531
+ const deviceButton = screen . getByRole ( "button" , { name : "dehydrated device " } ) ;
532
532
533
533
// ... which should contain the device name
534
534
expect ( within ( deviceButton ) . getByText ( "dehydrated device" ) ) . toBeInTheDocument ( ) ;
@@ -571,12 +571,12 @@ describe("<UserInfo />", () => {
571
571
572
572
// the dehydrated devices should be shown as an unverified device, which means
573
573
// there should now be a button with the first dehydrated device id ...
574
- const device1Button = screen . getByRole ( "button" , { description : "d1 " } ) ;
574
+ const device1Button = screen . getByRole ( "button" , { name : "dehydrated device 1 " } ) ;
575
575
576
576
// ... which should contain the device name
577
577
expect ( within ( device1Button ) . getByText ( "dehydrated device 1" ) ) . toBeInTheDocument ( ) ;
578
578
// and a button with the second dehydrated device id ...
579
- const device2Button = screen . getByRole ( "button" , { description : "d2 " } ) ;
579
+ const device2Button = screen . getByRole ( "button" , { name : "dehydrated device 2 " } ) ;
580
580
581
581
// ... which should contain the device name
582
582
expect ( within ( device2Button ) . getByText ( "dehydrated device 2" ) ) . toBeInTheDocument ( ) ;
0 commit comments