           sampleJs.click()
 
         runs ->
-          atom.workspaceView.getActivePane().showItem($$ -> @div('hello'))
+          atom.workspaceView.getActivePaneView().activateItem($$ -> @div('hello'))
           expect(atom.workspaceView.find('.selected')).not.toExist()
 
   describe "when a different editor becomes active", ->

        filePath = path.join(os.tmpdir(), 'non-project-file.txt')
        fs.writeFileSync(filePath, 'test')

        expect(-> atom.workspaceView.openSync(filePath)).not.toThrow()

      it "does not reveal the active file", ->
        filePath = path.join(os.tmpdir(), 'non-project-file.txt')
        fs.writeFileSync(filePath, 'test')
        atom.workspaceView.openSync(filePath)

        atom.workspaceView.trigger 'tree-view:reveal-active-file'
        expect(treeView.hasParent()).toBeFalsy()
        expect(treeView.root).not.toExist()

      describe "when the project is assigned a path because a new buffer is saved", ->
        it "creates a root directory view but does not attach to the root view", ->
          atom.workspaceView.openSync()
          projectPath = temp.mkdirSync('atom-project')
          atom.workspace.getActivePaneItem().saveAs(path.join(projectPath, 'test.txt'))
          expect(treeView.hasParent()).toBeFalsy()
          expect(fs.absolute(treeView.root.getPath())).toBe fs.absolute(projectPath)
          expect(treeView.root.parent()).toMatchSelector(".tree-view")

    describe "when the root view is opened to a file path", ->
      it "does not attach to the root view but does create a root node when initialized", ->
        atom.packages.deactivatePackage("tree-view")
        atom.packages.packageStates = {}
        atom.workspaceView.openSync('tree-view.js')

        waitsForPromise ->
          atom.packages.activatePackage('tree-view')


    describe "when the tree view is shown", ->
      it "focuses the tree view", ->
        waitsForPromise ->
          atom.workspace.open() # When we call focus below, we want an editor to become focused

        runs ->
          atom.workspaceView.focus()
          expect(treeView).toBeVisible()
          atom.workspaceView.trigger 'tree-view:toggle-focus'
          expect(treeView).toBeVisible()
          expect(treeView.list).toMatchSelector(':focus')

      describe "when the tree view is focused", ->
        it "unfocuses the tree view", ->
          waitsForPromise ->
            atom.workspace.open() # When we call focus below, we want an editor to become focused

          runs ->
            treeView.focus()
            expect(treeView).toBeVisible()
            atom.workspaceView.trigger 'tree-view:toggle-focus'
            expect(treeView).toBeVisible()
            expect(treeView.list).not.toMatchSelector(':focus')

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