File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed
packages/mui-material/src/Autocomplete Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -2904,33 +2904,30 @@ describe('<Autocomplete />', () => {
2904
2904
renderInput = { ( params ) => < TextField { ...params } autoFocus /> }
2905
2905
/> ,
2906
2906
) ;
2907
-
2907
+
2908
2908
const root = container . querySelector ( `.${ classes . root } ` ) ;
2909
-
2909
+
2910
2910
expect ( root ) . not . to . have . class ( classes . expanded ) ;
2911
-
2911
+
2912
2912
const textbox = screen . getByRole ( 'combobox' ) ;
2913
2913
fireEvent . keyDown ( textbox , { key : 'ArrowDown' } ) ; // open listbox
2914
-
2914
+
2915
2915
expect ( root ) . to . have . class ( classes . expanded ) ;
2916
2916
} ) ;
2917
2917
2918
2918
it ( 'when listbox having no options is opened' , ( ) => {
2919
2919
const { container } = render (
2920
- < Autocomplete
2921
- options = { [ ] }
2922
- renderInput = { ( params ) => < TextField { ...params } autoFocus /> }
2923
- /> ,
2920
+ < Autocomplete options = { [ ] } renderInput = { ( params ) => < TextField { ...params } autoFocus /> } /> ,
2924
2921
) ;
2925
-
2922
+
2926
2923
const root = container . querySelector ( `.${ classes . root } ` ) ;
2927
-
2924
+
2928
2925
expect ( root ) . not . to . have . class ( classes . expanded ) ;
2929
-
2926
+
2930
2927
const textbox = screen . getByRole ( 'combobox' ) ;
2931
2928
fireEvent . keyDown ( textbox , { key : 'ArrowDown' } ) ; // open listbox
2932
2929
2933
2930
expect ( root ) . to . have . class ( classes . expanded ) ;
2934
- } )
2935
- } )
2931
+ } ) ;
2932
+ } ) ;
2936
2933
} ) ;
You can’t perform that action at this time.
0 commit comments