         atom.config.set 'editor.invisibles', space: '-', eol: 'x'
         editor.getBuffer().insert([1, Infinity], '\n      ')
 
-        waitsForPromise -> atom.views.getNextUpdatePromise()
+        waitsForNextDOMUpdate()
 
         runs ->
           line2LeafNodes = getLeafNodes(component.lineNodeForScreenRow(2))


      it "does not render indent guides in trailing whitespace for lines containing non whitespace characters", ->
        editor.getBuffer().setText "  hi  "
        waitsForPromise -> atom.views.getNextUpdatePromise()

        runs ->
          line0LeafNodes = getLeafNodes(component.lineNodeForScreenRow(0))

    beforeEach ->
      console.log editor.getText()
      editor.setCursorScreenPosition([0, 0])
      waitsForNextDOMUpdate()

    it "adds the 'has-selection' class to the editor when there is a selection", ->
      expect(componentNode.classList.contains('has-selection')).toBe false
      editor.selectDown()

      waitsForNextDOMUpdate()

      runs ->
        expect(componentNode.classList.contains('has-selection')).toBe true
        editor.moveDown()

      waitsForNextDOMUpdate()

      runs ->
        expect(componentNode.classList.contains('has-selection')).toBe false
