           runs ->
             dispatchCommand('toggle-buffer-finder')
             expect(atom.workspace.panelForItem(bufferView).isVisible()).toBe true
-            expect(_.pluck(bufferView.list.find('li > div.file'), 'outerText')).toEqual ['sample.txt', 'sample.js', 'sample-with-tabs.coffee']
+
+          waitsForPaths(bufferView, ['sample.txt', 'sample.js', 'sample-with-tabs.coffee'])
+
+          runs ->
             dispatchCommand('toggle-buffer-finder')
             expect(atom.workspace.panelForItem(bufferView).isVisible()).toBe false
 

      atom.project.setPaths([rootDir2, projectPath])

      gitDirectory = atom.project.getDirectories()[1]
      gitRepository = atom.project.getRepositories()[1]

    describe "git-status-finder behavior", ->
      [originalText, originalPath, newPath] = []

          originalText = editor.getText()
          originalPath = editor.getPath()
          fs.writeFileSync(originalPath, 'making a change for the better')

        waitsForPromise ->
          gitRepository.refreshStatusForPath(originalPath)

        runs ->
          newPath = atom.project.getDirectories()[1].resolve('newsample.js')
          fs.writeFileSync(newPath, '')

        waitsForPromise ->
          gitRepository.refreshStatusForPath(newPath)

      it "displays all new and modified paths", ->
        expect(atom.workspace.panelForItem(gitStatusView)).toBeNull()
        dispatchCommand('toggle-git-status-finder')
        expect(atom.workspace.panelForItem(gitStatusView).isVisible()).toBe true

        waitForPathsToDisplay gitStatusView

        runs ->
          expect(gitStatusView.find('.status.status-modified').length).toBe 1
          expect(gitStatusView.find('.status.status-added').length).toBe 3

    describe "status decorations", ->
      [originalText, originalPath, editor, newPath] = []
