Add a spec for line wrapping in the presence of legacy scrollbars

This commit is contained in:
Nathan Sobo
2014-03-04 16:45:50 -07:00
parent 834dd963ef
commit e1bc62dae3

View File

@@ -1806,6 +1806,17 @@ describe "EditorView", ->
runs ->
expect(editor.getSoftWrapColumn()).toBeLessThan previousSoftWrapColumn
it "accounts for the width of the scrollbar if there is one", ->
# force the scrollbar to always be visible, regardless of OS visibility setting
$('#jasmine-content').prepend """
<style>
::-webkit-scrollbar { width: 15px; }
</style>
"""
setEditorHeightInLines(editorView, 5)
setEditorWidthInChars(editorView, 40)
expect(editor.lineForScreenRow(2).text.length).toBe 34
describe "gutter rendering", ->
beforeEach ->
editorView.attachToDom(heightInLines: 5.5)