         moveDialog = null
 
         beforeEach ->
+          rootView.attachToDom()
+
           waitsForFileToOpen ->
             fileView.click()
 


    describe "tree-view:open-selected-entry", ->
      describe "when a file is selected", ->
        it "opens the file in the editor and focuses it", ->
          waitsForFileToOpen ->
            treeView.root.find('.file:contains(tree-view.js)').click()

          expect(rootView.find('.selected')).not.toExist()

  describe "when a different editor becomes active", ->
    beforeEach ->
      rootView.attachToDom()

    it "selects the file in that is open in that editor", ->
      leftEditor = null
      rightEditor = null
