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 => {
243
243
test ( 'detects click outside' , t => {
244
244
const { tree } = t . context
245
245
const wrapper = mount ( < DropdownTreeSelect data = { tree } /> )
246
- const handleOutsideClick = spy ( wrapper . instance ( ) , 'handleOutsideClick ' )
246
+ const handleDropdownCollapse = spy ( wrapper . instance ( ) , 'handleDropdownCollapse ' )
247
247
248
+ wrapper . instance ( ) . onFocus ( )
248
249
wrapper . instance ( ) . handleClick ( )
249
250
t . true ( wrapper . state ( ) . showDropdown )
250
251
251
252
const event = new MouseEvent ( 'click' , { bubbles : true , cancelable : true } )
252
253
global . document . dispatchEvent ( event )
253
254
254
- t . true ( handleOutsideClick . calledOnce )
255
+ t . true ( handleDropdownCollapse . calledOnce )
255
256
t . false ( wrapper . state ( ) . showDropdown )
256
257
} )
257
258
You can’t perform that action at this time.
0 commit comments