       editor.setSelectedBufferRange([[1, 6], [1, 10]])
       component.setFontFamily('sans-serif')
 
-      waitsForPromise -> atom.views.getNextUpdatePromise()
+      waitsForNextDOMUpdate()
 
       runs ->
         selectionNode = componentNode.querySelector('.region')

    describe "when a line is folded", ->
      beforeEach ->
        editor.foldBufferRow 4
        waitsForPromise -> atom.views.getNextUpdatePromise()

      describe "when the folded line's fold-marker is clicked", ->
        it "unfolds the buffer row", ->

        verticalScrollbarNode.scrollTop = 1 * lineHeightInPixels
        verticalScrollbarNode.dispatchEvent(new UIEvent('scroll'))

      waitsForNextDOMUpdate()

      runs ->
        tilesNodes = component.tileNodesForLineNumbers()
