           waitsForPromise ->
             atom.workspace.open('sample.coffee')
 
-          waits 1
           runs ->
             # old editor has no more results
             expect(editorView.find('.highlight.find-result')).toHaveLength 0


        editor.setSelectedBufferRange([[5, 16], [5, 20]])

        waits 1
        runs ->
          expect(editorView.find('.current-result')).toHaveLength 0
          editor.setSelectedBufferRange([[5, 16], [5, 21]])

        waits 1
        runs ->
          newResult = editorView.find('.current-result')
          newPosition = resultPosition(newResult)
          expect(newResult).toHaveLength 1
          expect(newPosition).not.toBe originalPosition

    describe "when user types in the find editor", ->
      advance = ->


        findView.findEditor.trigger 'core:confirm'
        findView.findEditor.trigger 'core:confirm'

        nextResult = editorView.find('.current-result')
        nextPosition = resultPosition(nextResult)
        expect(nextResult).toHaveLength 1
        expect(nextPosition).not.toEqual firstPosition

        findView.findEditor.trigger 'find-and-replace:find-previous'
        findView.findEditor.trigger 'find-and-replace:find-previous'

        originalResult = editorView.find('.current-result')
        originalPosition = resultPosition(originalResult)
        expect(originalResult).toHaveLength 1
        expect(originalPosition).toEqual firstPosition

      it "adds a class to the result when the current selection equals the result's range", ->
        originalResult = editorView.find('.current-result')
