@@ -491,23 +491,7 @@ describe('DateField', () => {
491491 ) ;
492492
493493 let segments = getAllByRole ( 'spinbutton' ) ;
494- // focusableRef should point to the first editable segment (month in en-US)
495494 expect ( focusableRef . current ) . toBe ( segments [ 0 ] ) ;
496- } ) ;
497-
498- it ( 'should focus first segment when calling focus() on focusableRef' , ( ) => {
499- let focusableRef = React . createRef ( ) ;
500- let { getAllByRole} = render (
501- < DateField >
502- < Label > Birth date</ Label >
503- < DateInput focusableRef = { focusableRef } >
504- { segment => < DateSegment segment = { segment } /> }
505- </ DateInput >
506- </ DateField >
507- ) ;
508-
509- let segments = getAllByRole ( 'spinbutton' ) ;
510- expect ( document . activeElement ) . not . toBe ( segments [ 0 ] ) ;
511495
512496 // Programmatically focus the first segment
513497 act ( ( ) => {
@@ -516,23 +500,4 @@ describe('DateField', () => {
516500
517501 expect ( document . activeElement ) . toBe ( segments [ 0 ] ) ;
518502 } ) ;
519-
520- it ( 'should support focusableRef with different locales' , ( ) => {
521- let focusableRef = React . createRef ( ) ;
522- let { getAllByRole} = render (
523- < I18nProvider locale = "zh-CN" >
524- < DateField >
525- < Label > Birth date</ Label >
526- < DateInput focusableRef = { focusableRef } >
527- { segment => < DateSegment segment = { segment } /> }
528- </ DateInput >
529- </ DateField >
530- </ I18nProvider >
531- ) ;
532-
533- let segments = getAllByRole ( 'spinbutton' ) ;
534- // In zh-CN, year comes first
535- expect ( focusableRef . current ) . toBe ( segments [ 0 ] ) ;
536- expect ( segments [ 0 ] ) . toHaveAttribute ( 'data-type' , 'year' ) ;
537- } ) ;
538503} ) ;
0 commit comments