 
         # open something in sample.js
         resultsView.focus()
-        _.times 6, -> resultsView.trigger 'core:move-down'
+        _.times 6, -> atom.commands.dispatch resultsView[0], 'core:move-down'
         openHandler.reset()
-        resultsView.trigger 'core:confirm'
+        atom.commands.dispatch resultsView[0], 'core:confirm'
 
       waitsFor ->
         openHandler.callCount == 1

        resultsView.selectFirstResult()

        # open something in sample.coffee
        _.times 3, -> resultsView.trigger 'core:move-down'
        openHandler.reset()
        resultsView.trigger 'core:confirm'

      waitsFor ->
        openHandler.callCount == 1

  describe "when the result is for a long line", ->
    it "renders the context around the match", ->
      projectFindView.findEditor.setText('ghijkl')
      atom.commands.dispatch projectFindView[0], 'core:confirm'

      waitsForPromise ->
        searchPromise
