mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Render all operations when moving to bottom
This commit is contained in:
@@ -112,6 +112,8 @@ class PreviewList extends ScrollView
|
||||
@scrollTop(top) if top < @scrollTop()
|
||||
|
||||
scrollToBottom: ->
|
||||
@renderOperations(renderAll: true)
|
||||
|
||||
super()
|
||||
|
||||
@find('.selected').removeClass('selected')
|
||||
|
||||
@@ -54,3 +54,14 @@ describe "Preview List", ->
|
||||
previousOperationCount = previewList.find("li").length
|
||||
previewList.trigger 'command-panel:collapse-result'
|
||||
expect(previewList.find("li").length).toBeGreaterThan previousOperationCount
|
||||
|
||||
it "renders all operations when core:move-to-bottom is triggered", ->
|
||||
waitsForPromise ->
|
||||
commandPanelView.execute('X x/so/')
|
||||
|
||||
runs ->
|
||||
expect(previewList.prop('scrollHeight')).toBeGreaterThan previewList.height()
|
||||
previousScrollHeight = previewList.prop('scrollHeight')
|
||||
previewList.trigger 'core:move-to-bottom'
|
||||
liCount = previewList.getPathCount() + previewList.getOperations().length
|
||||
expect(previewList.find("li").length).toBe liCount
|
||||
|
||||
Reference in New Issue
Block a user