mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Add deactivate to TreeView
This commit is contained in:
@@ -77,6 +77,11 @@ describe "TreeView", ->
|
||||
|
||||
afterEach ->
|
||||
newTreeView.deactivate()
|
||||
describe "when the prototypes deactivate method is called", ->
|
||||
it "calls the deactivate on tree view instance", ->
|
||||
spyOn(treeView, "deactivate").andCallThrough()
|
||||
TreeView.deactivate()
|
||||
expect(treeView.deactivate).toHaveBeenCalled()
|
||||
|
||||
it "restores expanded directories and selected file when deserialized", ->
|
||||
treeView.find('.directory:contains(zed)').click()
|
||||
|
||||
@@ -19,6 +19,9 @@ class TreeView extends View
|
||||
@instance = new TreeView(rootView)
|
||||
@instance.attach()
|
||||
|
||||
@deactivate: () ->
|
||||
@instance.deactivate()
|
||||
|
||||
@serialize: ->
|
||||
@instance.serialize()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user