 
         describe "when the duplicate dialog's editor loses focus", ->
           it "removes the dialog and focuses root view", ->
-            atom.workspaceView.attachToDom()
-            atom.workspaceView.focus()
+            jasmine.attachToDOM(workspaceElement)
+            $(workspaceElement).focus()
             expect(copyDialog.parent()).not.toExist()
-            expect(atom.workspaceView.getActiveView().isFocused).toBeTruthy()
+            expect(atom.views.getView(atom.workspace.getActivePane())).toHaveFocus()
 
       describe "when a file is selected that's name starts with a '.'", ->
         [dotFilePath, dotFileView, copyDialog] = []

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

      runs ->
        atom.workspaceView.trigger 'tree-view:toggle'
        treeView = atom.workspaceView.find(".tree-view").view()
        root = $(treeView.root)
        dirView = $(treeView.root.entries).find('.directory:contains(test-dir):first')
        dirView[0].expand()


          runs ->
            treeView.trigger "tree-view:move"
            moveDialog = $(atom.workspace.getModalPanels()[0].getItemView()).view()

        it "selects the entire file name", ->
          expect(moveDialog).toExist()
