         treeView.height(100)
         treeView.attachToDom()
         $(element).view().expand() for element in treeView.find('.directory')
-        expect(treeView.find(".tree-view").prop('scrollHeight')).toBeGreaterThan treeView.find(".tree-view").outerHeight()
+        expect(treeView.treeViewList.prop('scrollHeight')).toBeGreaterThan treeView.treeViewList.outerHeight()
 
         expect(treeView.scrollTop()).toBe 0
         treeView.trigger 'core:move-to-bottom'

          rootView.focus()
          rootView.trigger 'tree-view:toggle'
          expect(treeView).toBeVisible()
          expect(treeView.find(".tree-view")).toMatchSelector(':focus')

    describe "when the tree view is hidden", ->
      it "shows and focuses the tree view", ->
        treeView.detach()
        rootView.trigger 'tree-view:toggle'
        expect(treeView.hasParent()).toBeTruthy()
        expect(treeView.find(".tree-view")).toMatchSelector(':focus')

  describe "when tree-view:reveal-current-file is triggered on the root view", ->
    beforeEach ->

    it "restores the focus state of the tree view", ->
      rootView.attachToDom()
      treeView.focus()
      expect(treeView.treeViewList).toMatchSelector ':focus'
      atom.deactivatePackage("tree-view")
      atom.activatePackage("tree-view")
      treeView = rootView.find(".tree-view").view()
      expect(treeView.treeViewList).toMatchSelector ':focus'

    it "restores the scroll top when toggled", ->
      rootView.height(5)
