 
           runs ->
             atom.commands.dispatch(treeView.element, "tree-view:duplicate")
-            copyDialog = $(atom.workspace.getModalPanels()[0].getItemView()).view()
+            copyDialog = $(atom.workspace.getModalPanels()[0].getItem()).view()
 
         it "selects the entire file name", ->
           expect(copyDialog).toExist()


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


        runs ->
          atom.commands.dispatch(treeView.element, "tree-view:add-file")
          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", ->
