@@ -2040,10 +2040,6 @@ cases(
2040
2040
}
2041
2041
) ;
2042
2042
2043
- /**
2044
- * onFocus hook is not being called when component is mounted is autoFocus true
2045
- * Reproducible here -> https://codesandbox.io/s/71xrkj0qj
2046
- */
2047
2043
cases (
2048
2044
'onFocus prop with autoFocus' ,
2049
2045
( { props = { ...BASIC_PROPS , autoFocus : true } } ) => {
@@ -2056,10 +2052,12 @@ cases(
2056
2052
} ,
2057
2053
{
2058
2054
'single select > should call auto focus only once when select is autoFocus' : {
2059
- skip : true ,
2055
+ props : {
2056
+ ...BASIC_PROPS ,
2057
+ autoFocus : true ,
2058
+ } ,
2060
2059
} ,
2061
2060
'multi select > should call auto focus only once when select is autoFocus' : {
2062
- skip : true ,
2063
2061
props : {
2064
2062
...BASIC_PROPS ,
2065
2063
autoFocus : true ,
@@ -2732,18 +2730,13 @@ test('to clear value when hitting escape if escapeClearsValue and isClearable ar
2732
2730
} ) ;
2733
2731
} ) ;
2734
2732
2735
- /**
2736
- * Selects the option on hitting spacebar on V2
2737
- * Needs varification
2738
- */
2739
- test . skip ( 'hitting spacebar should not select option if isSearchable is true (default)' , ( ) => {
2740
- // let onChangeSpy = jest.fn();
2741
- // let props = { ...BASIC_PROPS, onChange: onChangeSpy };
2742
- // let { container } = render(<Select {...props} menuIsOpen />);
2743
- // // Open Menu
2744
- // selectWrapper.setState({ focusedOption: OPTIONS[0] });
2745
- // fireEvent.keyDown(container, { keyCode: 32, key: ' ' });
2746
- // expect(onChangeSpy).not.toHaveBeenCalled();
2733
+ test ( 'hitting spacebar should not select option if isSearchable is true (default)' , ( ) => {
2734
+ let onChangeSpy = jest . fn ( ) ;
2735
+ let props = { ...BASIC_PROPS , onChange : onChangeSpy } ;
2736
+ let { container } = render ( < Select { ...props } menuIsOpen /> ) ;
2737
+ // Open Menu
2738
+ fireEvent . keyDown ( container , { keyCode : 32 , key : ' ' } ) ;
2739
+ expect ( onChangeSpy ) . not . toHaveBeenCalled ( ) ;
2747
2740
} ) ;
2748
2741
2749
2742
test ( 'renders with custom theme' , ( ) => {
0 commit comments