 
     describe "when a root folder is dragged out of application", ->
       it "should carry the folder's information", ->
-        gammaDir = $(treeView).find('.project-root:contains(gamma):first')
-        [dragStartEvent] = eventHelpers.buildPositionalDragEvents(gammaDir.find('.project-root-header')[0])
+        gammaDir = treeView.roots[1]
+        [dragStartEvent] = eventHelpers.buildPositionalDragEvents(gammaDir.querySelector('.project-root-header'))
         treeView.rootDragAndDrop.onDragStart(dragStartEvent)
 
         expect(dragStartEvent.originalEvent.dataTransfer.getData("text/plain")).toEqual gammaDirPath

            expect(treeView).toBeVisible()
            atom.commands.dispatch(workspaceElement, 'tree-view:toggle-focus')
            expect(treeView).toBeVisible()
            expect(treeView.list).not.toMatchSelector(':focus')

  describe "when tree-view:reveal-active-file is triggered on the root view", ->
    beforeEach ->

            jasmine.attachToDOM(treeView.element)
            atom.commands.dispatch copyDialog.element, 'core:cancel'
            expect(atom.workspace.getModalPanels().length).toBe 0
            expect(treeView.find(".tree-view")).toHaveFocus()

        describe "when the duplicate dialog's editor loses focus", ->
          it "removes the dialog and focuses root view", ->
