mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
✅ Thoroughly test LinesYardstick interactions
This commit is contained in:
@@ -3558,19 +3558,6 @@ describe "TextEditorComponent", ->
|
||||
nextAnimationFrame()
|
||||
expect(wrapperNode.getScrollTop()).toBe 0
|
||||
|
||||
describe "::screenPositionForPixelPosition(pixelPosition)", ->
|
||||
it "clips pixel positions above buffer start", ->
|
||||
expect(component.screenPositionForPixelPosition(top: -Infinity, left: -Infinity)).toEqual [0, 0]
|
||||
expect(component.screenPositionForPixelPosition(top: -Infinity, left: Infinity)).toEqual [0, 0]
|
||||
expect(component.screenPositionForPixelPosition(top: -1, left: Infinity)).toEqual [0, 0]
|
||||
expect(component.screenPositionForPixelPosition(top: 0, left: Infinity)).toEqual [0, 29]
|
||||
|
||||
it "clips pixel positions below buffer end", ->
|
||||
expect(component.screenPositionForPixelPosition(top: Infinity, left: -Infinity)).toEqual [12, 2]
|
||||
expect(component.screenPositionForPixelPosition(top: Infinity, left: Infinity)).toEqual [12, 2]
|
||||
expect(component.screenPositionForPixelPosition(top: component.getScrollHeight() + 1, left: 0)).toEqual [12, 2]
|
||||
expect(component.screenPositionForPixelPosition(top: component.getScrollHeight() - 1, left: 0)).toEqual [12, 0]
|
||||
|
||||
describe "::getVisibleRowRange()", ->
|
||||
beforeEach ->
|
||||
wrapperNode.style.height = lineHeightInPixels * 8 + "px"
|
||||
|
||||
Reference in New Issue
Block a user