update editor view specs to account for lineHeight

This commit is contained in:
Justin Palmer
2014-03-24 11:37:58 -07:00
parent ce02dcf5a5
commit c389bccfa0

View File

@@ -2937,14 +2937,14 @@ describe "EditorView", ->
.editor { line-height: 2; }
"""
expect(editorView.pixelPositionForScreenPosition([1, 3])).toEqual {top: 32, left: 30}
expect(editorView.getCursorView().position()).toEqual {top: 32, left: 30}
expect(editorView.pixelPositionForScreenPosition([1, 3])).toEqual {top: 20, left: 30}
expect(editorView.getCursorView().position()).toEqual {top: 20, left: 30}
atom.themes.applyStylesheet 'char-width', """
.editor { letter-spacing: 2px; }
"""
expect(editorView.pixelPositionForScreenPosition([1, 3])).toEqual {top: 32, left: 36}
expect(editorView.getCursorView().position()).toEqual {top: 32, left: 36}
expect(editorView.pixelPositionForScreenPosition([1, 3])).toEqual {top: 20, left: 36}
expect(editorView.getCursorView().position()).toEqual {top: 20, left: 36}
describe "when the editor contains hard tabs", ->
it "correctly calculates the the position left for a column", ->