             atom.project.open('sample.coffee').then (o) -> newEditor = o
 
           runs ->
-            newEditorView = editorView.getPaneView().splitRight(newEditor).activeView
+            newEditor = atom.workspace.paneForItem(editor).splitRight(items: [newEditor]).getActiveItem()
+            expect(getResultDecorations(newEditor, 'find-result')).toHaveLength 7
+
             expect(findView.resultCounter.text()).toEqual('7 found')
-            expect(newEditorView.getModel().getSelectedBufferRange()).toEqual [[0, 0], [0, 0]]
+            expect(newEditor.getSelectedBufferRange()).toEqual [[0, 0], [0, 0]]
 
             atom.commands.dispatch(findView.findEditor[0], 'find-and-replace:find-next')
             expect(findView.resultCounter.text()).toEqual('1 of 7')
-            expect(newEditorView.getModel().getSelectedBufferRange()).toEqual [[1, 9], [1, 14]]
+            expect(newEditor.getSelectedBufferRange()).toEqual [[1, 9], [1, 14]]
 
         it "highlights the found text in the new edit session (and removes the highlights from the other)", ->
           [newEditor, newEditorView] = []
 
           waitsForPromise ->
-            atom.project.open('sample.coffee').then (o) -> newEditor = o
-
-          runs ->
-            newEditorView = editorView.getPaneView().splitRight(newEditor).activeView
+            atom.workspace.open('sample.coffee').then (o) -> newEditor = o
 
           runs ->
             # old editor has no more results
-            expect(editorView.find('.find-result')).toHaveLength 0
+            expect(getResultDecorations(editor, 'find-result')).toHaveLength 0
 
             # new one has 7 results
-            expect(newEditorView.find('.find-result')).toHaveLength 7
+            expect(getResultDecorations(newEditor, 'find-result')).toHaveLength 7
 
         it "will still highlight results after the split pane has been destroyed", ->
           [newEditor, newEditorView] = []
 
           waitsForPromise ->
-            atom.project.open('sample.coffee').then (o) -> newEditor = o
+            atom.workspace.open('sample.coffee').then (o) -> newEditor = o
 
           runs ->
-            newEditorView = editorView.getPaneView().splitRight(newEditor).activeView
-            expect(newEditorView.find('.find-result')).toHaveLength 7
-
-            newEditorView.focus()
-            newEditorView.trigger('core:close')
+            originalPane = atom.workspace.paneForItem(editor)
+            splitPane = atom.workspace.paneForItem(editor).splitRight()
+            originalPane.moveItemToPane(newEditor, splitPane, 0)
+            expect(getResultDecorations(newEditor, 'find-result')).toHaveLength 7
+
+            newEditorView = atom.views.getView(editor)
+            atom.commands.dispatch newEditorView, 'core:close'
             editorView.focus()
 
+            expect(atom.workspace.getActiveEditor()).toBe editor
+
           runs ->
-            expect(editorView.find('.find-result')).toHaveLength 6
+            expect(getResultDecorations(editor, 'find-result')).toHaveLength 6
 
     describe "when the buffer contents change", ->
       it "re-runs the search", ->
-        findResultsView = editorView.find('.search-results')
         editor.setSelectedBufferRange([[1, 26], [1, 27]])
         editor.insertText("")
 

      atom.config.set('find-and-replace.caseSensitive', true)
      atom.config.set('find-and-replace.inCurrentSelection', true)

      editorView.trigger 'find-and-replace:show'

      waitsForPromise ->
        activationPromise


    it "places the selected text into the find editor when find-and-replace:set-find-pattern is triggered", ->
      editor.setSelectedBufferRange([[1,6],[1,10]])
      atom.commands.dispatch workspaceElement, 'find-and-replace:use-selection-as-find-pattern'

      expect(findView.findEditor.getText()).toBe 'sort'
      expect(editor.getSelectedBufferRange()).toEqual [[1,6],[1,10]]

      atom.commands.dispatch workspaceElement, 'find-and-replace:find-next'
      expect(editor.getSelectedBufferRange()).toEqual [[8,11],[8,15]]

    it "does not highlight the found text when the find view is hidden", ->
      atom.commands.dispatch(findView.findEditor[0], 'core:cancel')
      atom.commands.dispatch(findView.findEditor[0], 'find-and-replace:find-next')

    describe "when the active pane item changes", ->
      beforeEach ->
