mirror of
https://github.com/atom/atom.git
synced 2026-01-25 23:08:18 -05:00
Use input element to test focus after cancel
This commit is contained in:
@@ -209,15 +209,18 @@ describe 'FuzzyFinder', ->
|
||||
rootView.attachToDom()
|
||||
rootView.getActiveEditor().destroyActiveEditSession()
|
||||
|
||||
inputView = $$ -> @input id: "div-view"
|
||||
rootView.append(inputView)
|
||||
inputView.focus()
|
||||
|
||||
rootView.trigger 'fuzzy-finder:toggle-file-finder'
|
||||
expect(finderView.hasParent()).toBeTruthy()
|
||||
expect(rootView.isFocused).toBeFalsy()
|
||||
expect(finderView.miniEditor.isFocused).toBeTruthy()
|
||||
|
||||
finderView.cancel()
|
||||
|
||||
expect(finderView.hasParent()).toBeFalsy()
|
||||
expect($(document.activeElement).view()).toBe rootView
|
||||
expect(document.activeElement).toBe inputView[0]
|
||||
expect(finderView.miniEditor.isFocused).toBeFalsy()
|
||||
|
||||
describe "cached file paths", ->
|
||||
|
||||
Reference in New Issue
Block a user