mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-13 08:44:12 +03:00
We are using scrollTop instead of -wekbit-transform, update specs to reflect this.
This commit is contained in:
parent
6952e09646
commit
5a0eb5814d
@ -286,16 +286,16 @@ describe "Editor", ->
|
||||
expect(editor.gutter.lineNumbers.css('-webkit-tranform')).toBeNull()
|
||||
|
||||
describe "when called with a scroll top argument", ->
|
||||
it "sets the scrollTop of the vertical scrollbar and sets a transform on the line numbers and lines", ->
|
||||
it "sets the scrollTop of the vertical scrollbar and sets scrollTop on the line numbers and lines", ->
|
||||
editor.scrollTop(100)
|
||||
expect(editor.verticalScrollbar.scrollTop()).toBe 100
|
||||
expect(editor.visibleLines.css('-webkit-transform')).toBe 'matrix(1, 0, 0, 1, 0, -100)'
|
||||
expect(editor.gutter.lineNumbers.css('-webkit-transform')).toBe 'matrix(1, 0, 0, 1, 0, -100)'
|
||||
expect(editor.scrollView.scrollTop()).toBe 100
|
||||
expect(editor.gutter.scrollTop()).toBe 100
|
||||
|
||||
editor.scrollTop(150)
|
||||
expect(editor.verticalScrollbar.scrollTop()).toBe 150
|
||||
expect(editor.visibleLines.css('-webkit-transform')).toBe 'matrix(1, 0, 0, 1, 0, -150)'
|
||||
expect(editor.gutter.lineNumbers.css('-webkit-transform')).toBe 'matrix(1, 0, 0, 1, 0, -150)'
|
||||
editor.scrollTop(120)
|
||||
expect(editor.verticalScrollbar.scrollTop()).toBe 120
|
||||
expect(editor.scrollView.scrollTop()).toBe 120
|
||||
expect(editor.gutter.scrollTop()).toBe 120
|
||||
|
||||
it "does not allow negative scrollTops to be assigned", ->
|
||||
editor.scrollTop(-100)
|
||||
@ -316,8 +316,8 @@ describe "Editor", ->
|
||||
it "doesn't adjust the scrollTop of the vertical scrollbar", ->
|
||||
editor.scrollTop(100, adjustVerticalScrollbar: false)
|
||||
expect(editor.verticalScrollbar.scrollTop()).toBe 0
|
||||
expect(editor.visibleLines.css('-webkit-transform')).toBe 'matrix(1, 0, 0, 1, 0, -100)'
|
||||
expect(editor.gutter.lineNumbers.css('-webkit-transform')).toBe 'matrix(1, 0, 0, 1, 0, -100)'
|
||||
expect(editor.scrollView.scrollTop()).toBe 100
|
||||
expect(editor.gutter.scrollTop()).toBe 100
|
||||
|
||||
describe "when called with no argument", ->
|
||||
it "returns the last assigned value or 0 if none has been assigned", ->
|
||||
|
Loading…
Reference in New Issue
Block a user