mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Add spec for pane focusing the its current item view when it's focused
This commit is contained in:
committed by
probablycorey
parent
568fcf441e
commit
281a28bb0e
@@ -102,6 +102,13 @@ describe "Pane", ->
|
||||
expect(editSession1.destroyed).toBeTruthy()
|
||||
expect(editSession2.destroyed).toBeTruthy()
|
||||
|
||||
describe ".focus()", ->
|
||||
it "focuses the current item", ->
|
||||
focusHandler = jasmine.createSpy("focusHandler")
|
||||
pane.currentItem.on 'focus', focusHandler
|
||||
pane.focus()
|
||||
expect(focusHandler).toHaveBeenCalled()
|
||||
|
||||
describe ".itemForPath(path)", ->
|
||||
it "returns the item for which a call to .getPath() returns the given path", ->
|
||||
expect(pane.itemForPath(editSession1.getPath())).toBe editSession1
|
||||
|
||||
Reference in New Issue
Block a user