           initialSelectedRange = editorView.getModel().getSelectedBufferRange()
 
           # now we can find next
-          editorView.trigger 'find-and-replace:find-next'
+          atom.commands.dispatch editorView[0], 'find-and-replace:find-next'
           expect(editorView.getModel().getSelectedBufferRange()).not.toEqual initialSelectedRange
 
   describe "replacing", ->


    describe "case sensitivity", ->
      beforeEach ->
        editorView.trigger 'project-find:show'
        spyOn(atom.project, 'scan').andCallFake -> Q()
        projectFindView.findEditor.setText('ITEMS')
        atom.commands.dispatch(projectFindView[0], 'core:confirm')

        expect(getAtomPanel()).toBeVisible()
        expect(projectFindView.pathsEditor.getText()).toBe('nested')

        atom.commands.dispatch tree.name[0], 'project-find:show-in-current-directory'
        expect(projectFindView.pathsEditor.getText()).toBe('')

    it "populates the pathsEditor when triggered on a file", ->
      atom.commands.dispatch nested.files.find('> .file:eq(0)').view().name[0], 'project-find:show-in-current-directory'

      waitsForPromise ->
        activationPromise
