File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -243,15 +243,16 @@ test('deactivates dropdown active on blur', t => {
243243test ( 'detects click outside' , t => {
244244 const { tree } = t . context
245245 const wrapper = mount ( < DropdownTreeSelect data = { tree } /> )
246- const handleOutsideClick = spy ( wrapper . instance ( ) , 'handleOutsideClick ' )
246+ const handleDropdownCollapse = spy ( wrapper . instance ( ) , 'handleDropdownCollapse ' )
247247
248+ wrapper . instance ( ) . onFocus ( )
248249 wrapper . instance ( ) . handleClick ( )
249250 t . true ( wrapper . state ( ) . showDropdown )
250251
251252 const event = new MouseEvent ( 'click' , { bubbles : true , cancelable : true } )
252253 global . document . dispatchEvent ( event )
253254
254- t . true ( handleOutsideClick . calledOnce )
255+ t . true ( handleDropdownCollapse . calledOnce )
255256 t . false ( wrapper . state ( ) . showDropdown )
256257} )
257258
You can’t perform that action at this time.
0 commit comments