@@ -27,7 +27,7 @@ describe('LocalePicker', () => {
2727 createWrapper ( { availableLocales : [ 'en' , 'de' ] , locale : 'de' } ) ;
2828 // The option to expand the dropdown menu is rendered by a CompanionWindow titleControls prop in WindowSideBarInfoPanel, which is a combobox
2929 const dropdownTitle = screen . getByRole ( 'combobox' ) ;
30- expect ( dropdownTitle ) . toHaveTextContent ( 'de ' ) ;
30+ expect ( dropdownTitle ) . toHaveTextContent ( 'Deutsch ' ) ;
3131 } ) ;
3232
3333 it ( 'renders a select with both options and sets the current value' , async ( ) => {
@@ -41,10 +41,10 @@ describe('LocalePicker', () => {
4141 // Assert that the menu element has 2 children (2 options)
4242 expect ( menu . children ) . toHaveLength ( 2 ) ; // eslint-disable-line testing-library/no-node-access
4343 // Verify that the select element has the correct value ('de')
44- const deOption = screen . getByRole ( 'option' , { name : 'de ' } ) ;
44+ const deOption = screen . getByRole ( 'option' , { name : 'Deutsch ' } ) ;
4545 expect ( deOption ) . toHaveAttribute ( 'aria-selected' , 'true' ) ;
4646 // Verify en is also an option
47- expect ( screen . getByRole ( 'option' , { name : 'en ' } ) ) . toBeInTheDocument ( ) ;
47+ expect ( screen . getByRole ( 'option' , { name : 'English ' } ) ) . toBeInTheDocument ( ) ;
4848 } ) ;
4949
5050 it ( 'triggers setLocale prop when clicking a list item' , async ( ) => {
@@ -59,7 +59,7 @@ describe('LocalePicker', () => {
5959 // Open the Select component
6060 await user . click ( dropdownTitle ) ;
6161 // Change the locale to 'de'
62- await user . click ( screen . getByRole ( 'option' , { name : 'de ' } ) ) ;
62+ await user . click ( screen . getByRole ( 'option' , { name : 'Deutsch ' } ) ) ;
6363 expect ( setLocale ) . toHaveBeenCalledTimes ( 1 ) ;
6464 expect ( setLocale ) . toHaveBeenCalledWith ( 'de' ) ;
6565 } ) ;
0 commit comments