         children.each (index, child) ->
           $(child).view().expand()
 
-      describe "when an expanded directory is collapsed while holding the alt key", ->
+      describe "when an expanded directory is recursively collapsed", ->
         it "collapses the directory and all its child directories", ->
           parent.click().expand()
           expect(parent).toHaveClass 'expanded'

            treeView.trigger 'tree-view:expand-directory'

    describe "tree-view:recursive-expand-directory", ->
      describe "when an collapsed root is expanded while holding the alt key", ->
        it "expands the root and all subdirectories", ->
          treeView.root.click()
          treeView.root.collapse()

        expect(subdir).not.toHaveClass 'expanded'
        expect(atom.workspaceView.getActiveView().isFocused).toBeFalsy()

  describe "when an directory is alt-clicked", ->
    describe "when the directory is collapsed", ->
      it "recursively expands the directory", ->
        treeView.root.click()
        treeView.root.collapse()

        expect(treeView.root).not.toHaveClass 'expanded'
        treeView.root.trigger clickEvent({ altKey: true })
        expect(treeView.root).toHaveClass 'expanded'

        children = treeView.root.find('.directory')
        expect(children.length).toBeGreaterThan 0
        children.each (index, child) ->
          childView = $(child).view()
          expect(childView).toHaveClass 'expanded'

    describe "when the directory is expanded", ->
      parent    = null
      children  = null

      beforeEach ->
        parent = treeView.root.find('> .entries > .directory').eq(2).view()
        parent.expand()
        children = parent.find('.expanded.directory')
        children.each (index, child) ->
          $(child).view().expand()

      it "recursively collapses the directory", ->
        parent.click().expand()
        expect(parent).toHaveClass 'expanded'
        children.each (index, child) ->
          $(child).view().click().expand()
          expect($(child).view()).toHaveClass 'expanded'

        parent.trigger clickEvent({ altKey: true })

        expect(parent).not.toHaveClass 'expanded'
        children.each (index, child) ->
          expect($(child).view()).not.toHaveClass 'expanded'
        expect(treeView.root).toHaveClass 'expanded'

  describe "when the active item changes on the active pane", ->
    describe "when the item has a path", ->
      it "selects the entry with that path in the tree view if it is visible", ->
