mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Add spec for cursor position updates when the font family changes
This commit is contained in:
@@ -396,6 +396,14 @@ describe "EditorComponent", ->
|
||||
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 family changes", ->
|
||||
editor.setCursorBufferPosition([1, 10])
|
||||
component.setFontFamily('sans-serif')
|
||||
cursorNode = node.querySelector('.cursor')
|
||||
|
||||
{left} = editor.pixelPositionForScreenPosition([1, 10])
|
||||
expect(cursorNode.style['-webkit-transform']).toBe "translate3d(#{left}px, #{editor.getLineHeightInPixels()}px, 0px)"
|
||||
|
||||
describe "selection rendering", ->
|
||||
[scrollViewNode, scrollViewClientLeft] = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user