File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1445,7 +1445,10 @@ test('shows the localized title while it still names the current title', () => {
14451445 } ,
14461446 } ) ;
14471447
1448- expect ( screen . getByText ( 'Tableau de bord' ) ) . toBeInTheDocument ( ) ;
1448+ expect ( screen . getAllByText ( 'Tableau de bord' ) . length ) . toBeGreaterThan ( 0 ) ;
1449+ expect (
1450+ screen . getByRole ( 'heading' , { level : 1 , name : 'Tableau de bord' } ) ,
1451+ ) . toBeInTheDocument ( ) ;
14491452 expect ( screen . queryByText ( 'Dashboard Title' ) ) . not . toBeInTheDocument ( ) ;
14501453} ) ;
14511454
@@ -1461,7 +1464,9 @@ test('falls back to the canonical title once a rename outdates the translation',
14611464 } ,
14621465 } ) ;
14631466
1464- expect ( screen . getByText ( 'Dashboard Title' ) ) . toBeInTheDocument ( ) ;
1467+ expect (
1468+ screen . getByRole ( 'heading' , { level : 1 , name : 'Dashboard Title' } ) ,
1469+ ) . toBeInTheDocument ( ) ;
14651470 expect ( screen . queryByText ( 'Tableau de bord' ) ) . not . toBeInTheDocument ( ) ;
14661471} ) ;
14671472
Original file line number Diff line number Diff line change @@ -883,7 +883,7 @@ const Header = ({ onOpenMobileFilters }: HeaderComponentProps): JSX.Element => {
883883 className = "dashboard-header-container"
884884 >
885885 < VisuallyHidden as = "h1" >
886- { dashboardTitle || t ( 'Dashboard' ) }
886+ { editableTitleProps . title || t ( 'Dashboard' ) }
887887 </ VisuallyHidden >
888888 < PageHeaderWithActions
889889 editableTitleProps = { editableTitleProps }
You can’t perform that action at this time.
0 commit comments