Sha256: 5c985ae67570f3dcccdb35a73ca83468c03133d83ab35c77d532d6e5472b5b0d

Contents?: true

Size: 880 Bytes

Versions: 4

Compression:

Stored size: 880 Bytes

Contents

{assert, clickToolbarButton, moveCursor, test, testGroup, typeCharacters} = Trix.TestHelpers

testGroup "View caching", template: "editor_empty", ->
  test "reparsing and rendering identical texts", (done) ->
    typeCharacters "a\nb\na", ->
      moveCursor direction: "left", times: 2, ->
        clickToolbarButton attribute: "quote", ->
          html = getEditorElement().innerHTML
          getEditorController().reparse()
          getEditorController().render()
          assert.equal getEditorElement().innerHTML, html
          done()

  test "reparsing and rendering identical blocks", (done) ->
    clickToolbarButton attribute: "bullet", ->
      typeCharacters "a\na", ->
        html = getEditorElement().innerHTML
        getEditorController().reparse()
        getEditorController().render()
        assert.equal getEditorElement().innerHTML, html
        done()

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vapid-0.1.3 lib/vapid/vendor/trix/test/src/system/caching_test.coffee
vapid-0.1.2 lib/vapid/vendor/trix/test/src/system/caching_test.coffee
vapid-0.1.1 lib/vapid/vendor/trix/test/src/system/caching_test.coffee
vapid-0.1.0 lib/vapid/vendor/trix/test/src/system/caching_test.coffee