                 expect(atom.workspace.getActivePaneItem().getPath()).toBe newPath
 
               waitsFor "tree view to be updated", ->
-                dirView.entries.find("> .file").length > 1
+                $(dirView[0].entries).find("> .file").length > 1
 
               runs ->
                 expect(treeView.find('.selected').text()).toBe path.basename(newPath)

      atom.project.getRepo().getPathStatus(modifiedFile)

      treeView.updateRoot()
      treeView.root.entries.find('.directory:contains(dir)').expand()

    describe "when the project is the repository root", ->
      it "adds a custom style", ->


        runs ->
          treeView.trigger "tree-view:add-folder"
          addDialog = atom.workspaceView.find(".tree-view-dialog").view()

      describe "when a file is selected", ->
        it "opens an add dialog with the file's current directory path populated", ->
