         resultsView.selectFirstResult()
 
     it "copies the selected line onto the clipboard", ->
-      _.times 2, -> resultsView.trigger 'core:move-down'
-      resultsView.trigger 'core:copy'
+      _.times 2, -> atom.commands.dispatch resultsView[0], 'core:move-down'
+      atom.commands.dispatch resultsView[0], 'core:copy'
       expect(atom.clipboard.read()).toBe '    return items if items.length <= 1'

        resultsView.find('.selected').removeClass('selected')
        resultsView.find('.path:eq(0)').addClass('selected').addClass('collapsed')

        resultsView.trigger 'core:move-right'

        selectedItem = resultsView.find('.selected')
        expect(selectedItem).toHaveClass('search-result')

          resultsView.find('.path:eq(1) .search-result:first').addClass('selected')
          resultsView.find('.path:eq(0)').view().expand(false)

          atom.commands.dispatch resultsView[0], 'core:move-up'

          selectedItem = resultsView.find('.selected')
          expect(selectedItem).toHaveClass('path')
