Moving up in tree view doesn't skip over files inside of directories

This commit is contained in:
Corey Johnson
2012-05-04 14:56:41 -07:00
parent 37438c6da8
commit 2229c4be21
2 changed files with 15 additions and 3 deletions

View File

@@ -197,6 +197,16 @@ describe "TreeView", ->
treeView.trigger 'move-up'
expect(treeView.root.find('.entry:last')).toHaveClass 'selected'
describe "when there is an expanded directory before the currently selected entry", ->
it "selects the last entry in the expanded directory", ->
lastDir = treeView.root.find('.directory:last').view()
fileAfterDir = lastDir.next().view()
lastDir.expand()
fileAfterDir.click()
treeView.trigger 'move-up'
expect(lastDir.find('.entry:last')).toHaveClass 'selected'
describe "when there is an entry before the currently selected entry", ->
it "selects the previous entry", ->
lastEntry = treeView.root.find('.entry:last')
@@ -212,7 +222,6 @@ describe "TreeView", ->
subdir.expand()
subdir.find('> .entries > .entry:first').click()
treeView.trigger 'move-up'
expect(subdir).toHaveClass 'selected'