             dotFileView.dispatchEvent(new MouseEvent('click', {bubbles: true, detail: 1}))
 
           runs ->
+            workspaceElement = atom.views.getView(atom.workspace)
+            jasmine.attachToDOM(workspaceElement)
             atom.commands.dispatch(treeView.element, "tree-view:duplicate")
             copyDialog = atom.workspace.getModalPanels()[0].getItem()
 

            dotFileView.dispatchEvent(new MouseEvent('click', {bubbles: true, detail: 1}))

          runs ->
            atom.commands.dispatch(treeView.element, "tree-view:duplicate")
            copyDialog = atom.workspace.getModalPanels()[0].getItem()


    waitForPackageActivation()

    runs ->
      jasmine.attachToDOM(workspaceElement)
      treeView = atom.packages.getActivePackage("tree-view").mainModule.getTreeViewInstance()
      files = workspaceElement.querySelectorAll('li[is="tree-view-file"]')

