@@ -1017,7 +1017,7 @@ describe('DatePicker', function () {
10171017 expect ( segments [ 2 ] ) . toHaveFocus ( ) ;
10181018 } ) ;
10191019
1020- //This test should be reviewed
1020+ // This test should be reviewed
10211021 it ( 'should focus the button when the era is removed' , async function ( ) {
10221022 let { getByTestId, queryByTestId, getByRole} = render ( < DatePicker label = "Date" defaultValue = { new CalendarDate ( 'BC' , 2020 , 2 , 3 ) } /> ) ;
10231023 let field = getByTestId ( 'date-field' ) ;
@@ -1027,14 +1027,14 @@ describe('DatePicker', function () {
10271027 act ( ( ) => era . focus ( ) ) ;
10281028 await user . keyboard ( '{ArrowUp}' ) ;
10291029
1030- const button = getByRole ( 'button' )
1030+ const button = getByRole ( 'button' ) ;
10311031 act ( ( ) => button . focus ( ) ) ;
10321032
10331033 expect ( queryByTestId ( 'era' ) ) . toBeNull ( ) ;
10341034 expect ( document . activeElement ) . toBe ( button ) ;
10351035 } ) ;
10361036
1037- //This test should be reviewed
1037+ // This test should be reviewed
10381038 it ( 'should focus the button when the era is removed and is the first segment' , async function ( ) {
10391039 let { getByTestId, queryByTestId, getByRole} = render (
10401040 < Provider theme = { theme } locale = "lv-LV" >
@@ -1048,7 +1048,7 @@ describe('DatePicker', function () {
10481048 act ( ( ) => era . focus ( ) ) ;
10491049 await user . keyboard ( '{ArrowUp}' ) ;
10501050
1051- const button = getByRole ( 'button' )
1051+ const button = getByRole ( 'button' ) ;
10521052 act ( ( ) => button . focus ( ) ) ;
10531053 expect ( queryByTestId ( 'era' ) ) . toBeNull ( ) ;
10541054 expect ( document . activeElement ) . toBe ( button ) ;
@@ -1072,7 +1072,7 @@ describe('DatePicker', function () {
10721072 let onChange = jest . fn ( ) ;
10731073
10741074 // Test controlled mode
1075- let { getByLabelText, unmount, getByRole } = render (
1075+ let { getByLabelText, unmount} = render (
10761076 < Provider theme = { theme } locale = { options ?. locale } >
10771077 < DatePicker label = "Date" value = { value } onChange = { onChange } { ...options . props } />
10781078 </ Provider >
@@ -1351,8 +1351,8 @@ describe('DatePicker', function () {
13511351 expect ( segment ) . toHaveFocus ( ) ;
13521352 }
13531353
1354- let button = getByRole ( 'button' )
1355- act ( ( ) => button . focus ( ) )
1354+ let button = getByRole ( 'button' ) ;
1355+ act ( ( ) => button . focus ( ) ) ;
13561356 expect ( onChange ) . toHaveBeenCalledWith ( newValue ) ;
13571357 expect ( segment . textContent ) . toBe ( textContent ) ;
13581358
@@ -1369,7 +1369,6 @@ describe('DatePicker', function () {
13691369 textContent = segment . textContent ;
13701370 act ( ( ) => { segment . focus ( ) ; } ) ;
13711371
1372- count = 0 ;
13731372 for ( let [ i , key ] of [ ...keys ] . entries ( ) ) {
13741373 beforeInput ( segment , key ) ;
13751374
@@ -1390,8 +1389,8 @@ describe('DatePicker', function () {
13901389 expect ( segment ) . toHaveFocus ( ) ;
13911390 }
13921391
1393- button = getByRole ( 'button' )
1394- act ( ( ) => button . focus ( ) )
1392+ button = getByRole ( 'button' ) ;
1393+ act ( ( ) => button . focus ( ) ) ;
13951394 expect ( onChange ) . toHaveBeenCalledWith ( newValue ) ;
13961395 expect ( segment . textContent ) . not . toBe ( textContent ) ;
13971396
@@ -1550,7 +1549,7 @@ describe('DatePicker', function () {
15501549 act ( ( ) => { segment . focus ( ) ; } ) ;
15511550
15521551 await user . keyboard ( '{Backspace}' ) ;
1553- let button = getByRole ( 'button' )
1552+ let button = getByRole ( 'button' ) ;
15541553 act ( ( ) => { button . focus ( ) ; } ) ;
15551554 expect ( onChange ) . toHaveBeenCalledTimes ( 1 ) ;
15561555 expect ( onChange ) . toHaveBeenCalledWith ( newValue ) ;
@@ -1565,7 +1564,7 @@ describe('DatePicker', function () {
15651564 act ( ( ) => { segment . focus ( ) ; } ) ;
15661565
15671566 await user . keyboard ( '{Backspace}' ) ;
1568- button = getByRole ( 'button' )
1567+ button = getByRole ( 'button' ) ;
15691568 act ( ( ) => { button . focus ( ) ; } ) ;
15701569 expect ( onChange ) . toHaveBeenCalledTimes ( 1 ) ;
15711570 expect ( onChange ) . toHaveBeenCalledWith ( newValue ) ;
@@ -1640,7 +1639,7 @@ describe('DatePicker', function () {
16401639 act ( ( ) => { segment . focus ( ) ; } ) ;
16411640
16421641 await user . keyboard ( '{Backspace}' ) ;
1643- await user . tab ( )
1642+ await user . tab ( ) ;
16441643 expect ( onChange ) . toHaveBeenCalledTimes ( 1 ) ;
16451644 expect ( onChange ) . toHaveBeenCalledWith ( new CalendarDate ( 201 , 2 , 3 ) ) ;
16461645 expect ( segment ) . toHaveTextContent ( '٢٠١' ) ;
@@ -1661,13 +1660,13 @@ describe('DatePicker', function () {
16611660 let year = getByLabelText ( 'year,' ) ;
16621661 act ( ( ) => year . focus ( ) ) ;
16631662 await user . keyboard ( '{ArrowDown}' ) ;
1664- await user . tab ( )
1663+ await user . tab ( ) ;
16651664
16661665 expect ( getByTestId ( 'invalid-icon' ) ) . toBeVisible ( ) ;
16671666
16681667 act ( ( ) => year . focus ( ) ) ;
16691668 await user . keyboard ( '{ArrowUp}' ) ;
1670- await user . tab ( )
1669+ await user . tab ( ) ;
16711670 expect ( queryByTestId ( 'invalid-icon' ) ) . toBeNull ( ) ;
16721671 } ) ;
16731672
@@ -1828,7 +1827,7 @@ describe('DatePicker', function () {
18281827 expect ( onChange ) . toHaveBeenCalledTimes ( 0 ) ;
18291828 beforeInput ( document . activeElement , '0' ) ;
18301829 expect ( segments [ 2 ] ) . toHaveFocus ( ) ;
1831- await user . tab ( )
1830+ await user . tab ( ) ;
18321831 expect ( onChange ) . toHaveBeenCalledTimes ( 1 ) ;
18331832 value = new CalendarDate ( 2020 , 4 , 5 ) ;
18341833 expect ( onChange ) . toHaveBeenCalledWith ( value ) ;
0 commit comments