 
           runs ->
             atom.commands.dispatch(treeView.element, "tree-view:move")
-            moveDialog = $(atom.workspace.getModalPanels()[0].getItemView()).view()
+            moveDialog = $(atom.workspace.getModalPanels()[0].getItem()).view()
 
         afterEach ->
           waits 50 # The move specs cause too many false positives because of their async nature, so wait a little bit before we cleanup


    runs ->
      atom.commands.dispatch(workspaceElement, 'tree-view:toggle')
      treeView = $(atom.workspace.getLeftPanels()[0].getItemView()).view()

      root = $(treeView.root)
      sampleJs = treeView.find('.file:contains(tree-view.js)')

        atom.packages.activatePackage("tree-view")

      runs ->
        treeView = $(atom.workspace.getLeftPanels()[0].getItem()).view()
        expect(treeView).toExist()
        expect(treeView.selectedEntry()).toMatchSelector(".file:contains(tree-view.js)")
        expect(treeView.find(".directory:contains(dir1)")).toHaveClass("expanded")
