         projectFindView.findEditor.setText('sort')
         projectFindView.replaceEditor.setText('bort')
         projectFindView.pathsEditor.setText('abc')
-        projectFindView.findEditor.trigger 'core:confirm'
+        atom.commands.dispatch(projectFindView.findEditor[0], 'core:confirm')
 
         projectFindView.findEditor.setText('items')
         projectFindView.replaceEditor.setText('eyetims')
         projectFindView.pathsEditor.setText('def')
-        projectFindView.findEditor.trigger 'core:confirm'
+        atom.commands.dispatch(projectFindView.findEditor[0], 'core:confirm')
 
       it "can navigate the entire history stack", ->
         expect(projectFindView.findEditor.getText()).toEqual 'items'
 
-        projectFindView.findEditor.trigger 'core:move-up'
+        atom.commands.dispatch(projectFindView.findEditor[0], 'core:move-up')
         expect(projectFindView.findEditor.getText()).toEqual 'sort'
 
-        projectFindView.findEditor.trigger 'core:move-down'
+        atom.commands.dispatch(projectFindView.findEditor[0], 'core:move-down')
         expect(projectFindView.findEditor.getText()).toEqual 'items'
 
-        projectFindView.findEditor.trigger 'core:move-down'
+        atom.commands.dispatch(projectFindView.findEditor[0], 'core:move-down')
         expect(projectFindView.findEditor.getText()).toEqual ''
 
         expect(projectFindView.pathsEditor.getText()).toEqual 'def'
 
-        projectFindView.pathsEditor.trigger 'core:move-up'
+        atom.commands.dispatch(projectFindView.pathsEditor[0], 'core:move-up')
         expect(projectFindView.pathsEditor.getText()).toEqual 'abc'
 
-        projectFindView.pathsEditor.trigger 'core:move-down'
+        atom.commands.dispatch(projectFindView.pathsEditor[0], 'core:move-down')
         expect(projectFindView.pathsEditor.getText()).toEqual 'def'
 
-        projectFindView.pathsEditor.trigger 'core:move-down'
+        atom.commands.dispatch(projectFindView.pathsEditor[0], 'core:move-down')
         expect(projectFindView.pathsEditor.getText()).toEqual ''
 
         expect(projectFindView.replaceEditor.getText()).toEqual 'eyetims'
 
-        projectFindView.replaceEditor.trigger 'core:move-up'
+        atom.commands.dispatch(projectFindView.replaceEditor[0], 'core:move-up')
         expect(projectFindView.replaceEditor.getText()).toEqual 'bort'
 
-        projectFindView.replaceEditor.trigger 'core:move-down'
+        atom.commands.dispatch(projectFindView.replaceEditor[0], 'core:move-down')
         expect(projectFindView.replaceEditor.getText()).toEqual 'eyetims'
 
-        projectFindView.replaceEditor.trigger 'core:move-down'
+        atom.commands.dispatch(projectFindView.replaceEditor[0], 'core:move-down')
         expect(projectFindView.replaceEditor.getText()).toEqual ''
 
     describe "when find-and-replace:set-find-pattern is triggered", ->
       it "places the selected text into the find editor", ->
-        editorView.getEditor().setSelectedBufferRange([[1,6],[1,10]])
+        editorView.getModel().setSelectedBufferRange([[1,6],[1,10]])
         atom.workspaceView.trigger 'find-and-replace:use-selection-as-find-pattern'
         expect(projectFindView.findEditor.getText()).toBe 'sort'
 
-        editorView.getEditor().setSelectedBufferRange([[1,13],[1,21]])
+        editorView.getModel().setSelectedBufferRange([[1,13],[1,21]])
         atom.workspaceView.trigger 'find-and-replace:use-selection-as-find-pattern'
         expect(projectFindView.findEditor.getText()).toBe 'function'
 
       it "places the previously selected text into the find editor if no selection", ->
-        editorView.getEditor().setSelectedBufferRange([[1,13],[1,21]])
+        editorView.getModel().setSelectedBufferRange([[1,13],[1,21]])
         atom.workspaceView.trigger 'find-and-replace:use-selection-as-find-pattern'
         expect(projectFindView.findEditor.getText()).toBe 'function'
 
-        editorView.getEditor().setSelectedBufferRange([[1,30],[1,30]])
+        editorView.getModel().setSelectedBufferRange([[1,30],[1,30]])
         atom.workspaceView.trigger 'find-and-replace:use-selection-as-find-pattern'
         expect(projectFindView.findEditor.getText()).toBe ''
 

        initialPane = atom.workspaceView.getActivePaneView()
        atom.config.set('find-and-replace.openProjectFindResultsInRightPane', true)
        projectFindView.findEditor.setText('items')
        projectFindView.trigger 'core:confirm'

        waitsForPromise ->
          searchPromise

        runs ->
          expect(atom.project.scan).toHaveBeenCalled()
          atom.project.scan.reset()
          atom.commands.dispatch(projectFindView[0], 'core:confirm')

        waitsForPromise ->
          searchPromise
