       it "scrolls to the first match if the settings scrollToResultOnLiveSearch is true", ->
         editorView.style.height = "3px"
         editor.update?({autoHeight: false})
-        atom.views.performDocumentPoll()
+        editorView.component.measureDimensions()
         editor.moveToTop()
         atom.config.set('find-and-replace.scrollToResultOnLiveSearch', true)
         findView.findEditor.setText 'Array'

    it "does not show the wrap icon when the editor does not scroll", ->
      editorView.style.height = "400px"
      editor.update?({autoHeight: false})
      atom.views.performDocumentPoll()
      expect(editor.getVisibleRowRange()).toEqual [0, 12]

      atom.commands.dispatch editorView, 'find-and-replace:find-previous'

      it "doesn't scroll to the first match if the settings scrollToResultOnLiveSearch is false", ->
        editorView.style.height = "3px"
        editor.update?({autoHeight: false})
        editorView.component.measureDimensions()
        editor.moveToTop()
        atom.config.set('find-and-replace.scrollToResultOnLiveSearch', false)
        findView.findEditor.setText 'Array'
