Skip to content

Commit 663c96e

Browse files
committed
Add tests
1 parent e93148d commit 663c96e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

spec/tree-view-spec.coffee

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,12 +614,18 @@ describe "TreeView", ->
614614
expect(activePaneItem.isPending()).toBe true
615615

616616
it "terminates pending state on the double-click and focuses file", ->
617-
sampleJs.trigger clickEvent(originalEvent: {detail: 1})
618617
sampleJs.trigger clickEvent(originalEvent: {detail: 2})
619618
expect(atom.views.getView(activePaneItem)).toHaveFocus()
620619
waitsFor ->
621620
activePaneItem.isPending() is false
622621

622+
it "keeps focus on tree-view if the file is the active pane item", ->
623+
sampleJs.trigger clickEvent(originalEvent: {detail: 1})
624+
expect(treeView).toHaveFocus()
625+
626+
sampleJs.trigger clickEvent(originalEvent: {detail: 2})
627+
expect(treeView).toHaveFocus()
628+
623629
describe "when a directory is single-clicked", ->
624630
it "is selected", ->
625631
subdir = root1.find('.directory:first')

0 commit comments

Comments
 (0)