 
       describe "when a file is modified", ->
         it "updates its and its parent directories' styles", ->
-          expect(treeView.element.querySelector('.file.status-modified')).toHaveText('b.txt')
-          expect(treeView.element.querySelector('.directory.status-modified').header).toHaveText('dir')
+          expect(treeView.element.querySelector('.project-root .file.status-modified')).toHaveText('b.txt')
+          expect(treeView.element.querySelector('.project-root .directory.status-modified').header).toHaveText('dir')
+          expect(treeView.element.querySelector('.project-root')).toHaveClass('status-modified')
 
       describe "when a file loses its modified status", ->
         it "updates its and its parent directories' styles", ->
           fs.writeFileSync(modifiedFile, originalFileContent)
           atom.project.getRepositories()[0].getPathStatus(modifiedFile)
 
-          expect(treeView.element.querySelector('.file.status-modified')).not.toExist()
-          expect(treeView.element.querySelector('.directory.status-modified')).not.toExist()
+          expect(treeView.element.querySelector('.project-root .file.status-modified')).not.toExist()
+          expect(treeView.element.querySelector('.project-root .directory.status-modified')).not.toExist()
+          expect(treeView.element.querySelector('.project-root.status-modified')).not.toExist()
 
   describe "selecting items", ->
     [dirView, fileView1, fileView2, fileView3, treeView, rootDirPath, dirPath, filePath1, filePath2, filePath3] = []


    describe "when a file is modified", ->
      it "adds a custom style", ->
        expect(treeView.element.querySelector('.file.status-modified')).toHaveText('b.txt')

    describe "when a directory is modified", ->
      it "adds a custom style", ->
        expect(treeView.element.querySelector('.directory.status-modified').header).toHaveText('dir')

    describe "when a file is new", ->
      it "adds a custom style", ->
        treeView.roots[0].entries.querySelectorAll('.directory')[2].expand()
        expect(treeView.element.querySelector('.file.status-added')).toHaveText('new2')

    describe "when a directory is new", ->
      it "adds a custom style", ->
        expect(treeView.element.querySelector('.directory.status-added').header).toHaveText('dir2')

    describe "when a file is ignored", ->
      it "adds a custom style", ->
        expect(treeView.element.querySelector('.file.status-ignored')).toHaveText('ignored.txt')

    describe "when a file is selected in a directory", ->
      beforeEach ->


          atom.commands.dispatch(treeView.element, 'tree-view:remove')
          expect(atom.notifications.getNotifications().length).toBe 0

        it "focuses the first selected entry's parent folder", ->
          jasmine.attachToDOM(workspaceElement)

