Right arrow expands the selected directory in TreeView

This commit is contained in:
Nathan Sobo
2012-04-24 16:56:39 -06:00
parent 9a1d3e00b2
commit 48069dc898
3 changed files with 23 additions and 0 deletions

View File

@@ -179,3 +179,17 @@ describe "TreeView", ->
treeView.trigger 'move-up'
expect(rootDirectoryView).toHaveClass 'selected'
describe "tree-view:expand-directory", ->
describe "when a directory entry is selected", ->
it "expands the current directory", ->
subdir = rootDirectoryView.find('.directory:first')
subdir.click()
expect(subdir).not.toHaveClass 'expanded'
treeView.trigger 'tree-view:expand-directory'
expect(subdir).toHaveClass 'expanded'
describe "when a file entry is selected", ->
it "does nothing", ->
rootDirectoryView.find('.file').click()
treeView.trigger 'tree-view:expand-directory'