 
       runs ->
         atom.commands.dispatch(workspaceElement, 'tree-view:toggle')
-        treeView = $(atom.workspace.getLeftPanels()[0].getItemView()).view()
+        treeView = $(atom.workspace.getLeftPanels()[0].getItem()).view()
         dirView = $(treeView.root.entries).find('.directory:contains(test-dir)')
         dirView[0].expand()
         fileView1 = treeView.find('.file:contains(test-file1.txt)')

          root.removeClass('selected')
          expect(treeView.selectedEntry()).toBeNull()
          atom.commands.dispatch(treeView.element, "tree-view:add-file")
          addDialog = $(atom.workspace.getModalPanels()[0].getItemView()).view()

          expect(addDialog.miniEditor.getText().length).toBe 0



        runs ->
          atom.commands.dispatch(treeView.element, "tree-view:add-folder")
          addDialog = $(atom.workspace.getModalPanels()[0].getItem()).view()

      describe "when a file is selected", ->
        it "opens an add dialog with the file's current directory path populated", ->
