         treeView.focus()
         expect(treeView.element).toHaveFocus()
         atom.commands.dispatch(treeView.element, 'tool-panel:unfocus')
-        expect(atom.workspace.getLeftDock().isOpen()).toBe(true)
+        expect(atom.workspace.getLeftDock().isVisible()).toBe(true)
         expect(treeView.element).not.toHaveFocus()
         expect(atom.workspace.getActivePane().isActive()).toBe(true)
 


          runs ->
            treeView.focus()
            expect(atom.workspace.getLeftDock().isOpen()).toBe(true)
            treeView.toggleFocus()
            expect(atom.workspace.getLeftDock().isOpen()).toBe(true)
            expect(treeView.element).not.toHaveFocus()

  describe "when the tree-view is destroyed", ->

        atom.packages.deactivatePackage("tree-view")
        atom.packages.packageStates = {}
        atom.workspace.getLeftDock().hide()
        expect(atom.workspace.getLeftDock().isVisible()).toBe(false)

        waitsForPromise ->
          atom.workspace.open('tree-view.js')
