@@ -355,7 +355,7 @@ describe('SettingsSectionPage', () => {
355355 ) . toEqual ( [ 'Back' , 'Close' ] ) ;
356356 } ) ;
357357
358- it ( 'supports custom title semantics and close label' , ( ) => {
358+ it ( 'supports custom title semantics and close label without a desktop back button ' , ( ) => {
359359 render (
360360 < ScreenSizeProvider value = { ScreenSize . Desktop } >
361361 < SettingsSectionPage
@@ -369,7 +369,7 @@ describe('SettingsSectionPage', () => {
369369 ) ;
370370
371371 expect ( screen . getByRole ( 'heading' , { level : 1 } ) ) . toHaveTextContent ( 'Keyboard Shortcuts' ) ;
372- expect ( screen . getByRole ( 'button' , { name : 'Back' } ) ) . toBeInTheDocument ( ) ;
372+ expect ( screen . queryByRole ( 'button' , { name : 'Back' } ) ) . not . toBeInTheDocument ( ) ;
373373 expect ( screen . getByRole ( 'button' , { name : 'Close keyboard shortcuts' } ) ) . toBeInTheDocument ( ) ;
374374 } ) ;
375375
@@ -720,18 +720,17 @@ describe('Settings shallow route shell', () => {
720720 expect ( screen . getByRole ( 'heading' , { name : 'Devices section' } ) ) . toBeInTheDocument ( ) ;
721721 } ) ;
722722
723- it ( 'returns to general settings when desktop section back is clicked ' , async ( ) => {
723+ it ( 'does not show a desktop section back button in shallow settings ' , async ( ) => {
724724 const user = userEvent . setup ( ) ;
725725
726726 renderClientShell ( ScreenSize . Desktop ) ;
727727
728728 await user . click ( screen . getByRole ( 'button' , { name : 'Open settings' } ) ) ;
729729 await user . click ( screen . getByRole ( 'button' , { name : 'Devices' } ) ) ;
730- await user . click ( screen . getByRole ( 'button' , { name : 'Back' } ) ) ;
731730
732731 expect ( screen . getByRole ( 'heading' , { name : 'Home route' } ) ) . toBeInTheDocument ( ) ;
733- expect ( screen . getByRole ( 'heading' , { name : 'General section' } ) ) . toBeInTheDocument ( ) ;
734- expect ( screen . queryByRole ( 'heading ' , { name : 'Devices section ' } ) ) . not . toBeInTheDocument ( ) ;
732+ expect ( screen . getByRole ( 'heading' , { name : 'Devices section' } ) ) . toBeInTheDocument ( ) ;
733+ expect ( screen . queryByRole ( 'button ' , { name : 'Back ' } ) ) . not . toBeInTheDocument ( ) ;
735734 } ) ;
736735
737736 it ( 'closes a desktop shallow settings flow in one step after switching sections' , async ( ) => {
0 commit comments