mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Fix specs
This commit is contained in:
@@ -1038,6 +1038,7 @@ describe "DisplayBuffer", ->
|
||||
displayBuffer.manageScrollPosition = true
|
||||
displayBuffer.setLineHeightInPixels(10)
|
||||
displayBuffer.setDefaultCharWidth(10)
|
||||
displayBuffer.updateAllScreenLines()
|
||||
|
||||
it "disallows negative values", ->
|
||||
displayBuffer.setWidth(displayBuffer.getScrollWidth() + 100)
|
||||
@@ -1062,6 +1063,7 @@ describe "DisplayBuffer", ->
|
||||
displayBuffer.setHorizontalScrollbarHeight(0)
|
||||
displayBuffer.setHeight(50)
|
||||
displayBuffer.setWidth(50)
|
||||
displayBuffer.updateAllScreenLines()
|
||||
|
||||
it "sets the scroll top and scroll left so the given screen position is in view", ->
|
||||
displayBuffer.scrollToScreenPosition([8, 20])
|
||||
|
||||
@@ -62,6 +62,7 @@ describe "EditorComponent", ->
|
||||
|
||||
node.style.height = editor.getLineCount() * lineHeightInPixels + 'px'
|
||||
node.style.width = '1000px'
|
||||
editor.displayBuffer.updateAllScreenLines()
|
||||
component.measureScrollView()
|
||||
nextTick()
|
||||
|
||||
|
||||
@@ -733,6 +733,7 @@ describe "Editor", ->
|
||||
editor.setHorizontalScrollbarHeight(0)
|
||||
editor.setHeight(5.5 * 10)
|
||||
editor.setWidth(5.5 * 10)
|
||||
editor.displayBuffer.updateAllScreenLines()
|
||||
|
||||
it "scrolls down when the last cursor gets closer than ::verticalScrollMargin to the bottom of the editor", ->
|
||||
expect(editor.getScrollTop()).toBe 0
|
||||
@@ -1196,6 +1197,8 @@ describe "Editor", ->
|
||||
editor.setHeight(50)
|
||||
editor.setWidth(50)
|
||||
editor.setHorizontalScrollbarHeight(0)
|
||||
editor.displayBuffer.updateAllScreenLines()
|
||||
|
||||
expect(editor.getScrollTop()).toBe 0
|
||||
|
||||
editor.setSelectedBufferRange([[5, 6], [6, 8]], autoscroll: true)
|
||||
@@ -1230,6 +1233,7 @@ describe "Editor", ->
|
||||
editor.setDefaultCharWidth(10)
|
||||
editor.setHeight(50)
|
||||
editor.setWidth(50)
|
||||
editor.displayBuffer.updateAllScreenLines()
|
||||
|
||||
editor.addSelectionForBufferRange([[8, 10], [8, 15]])
|
||||
expect(editor.getScrollTop()).toBe 75
|
||||
|
||||
Reference in New Issue
Block a user