From ec65def5d34fb6b5e9564219a5c857bc620cc74b Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 2 Jun 2014 17:52:31 +0900 Subject: [PATCH] Add spec for cursor position updates when the font size changes --- spec/editor-component-spec.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index c2f923c61..da9f5fa5f 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -389,6 +389,11 @@ describe "EditorComponent", -> component.setLineHeight(2) cursorNode = node.querySelector('.cursor') expect(cursorNode.style['-webkit-transform']).toBe "translate3d(#{10 * editor.getDefaultCharWidth()}px, #{editor.getLineHeightInPixels()}px, 0px)" + + it "updates cursor positions when the font size changes", -> + editor.setCursorBufferPosition([1, 10]) + component.setFontSize(10) + cursorNode = node.querySelector('.cursor') expect(cursorNode.style['-webkit-transform']).toBe "translate3d(#{10 * editor.getDefaultCharWidth()}px, #{editor.getLineHeightInPixels()}px, 0px)" describe "selection rendering", ->