mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Wrap around fuzzy finder when at top or bottom
This commit is contained in:
@@ -223,16 +223,15 @@ describe 'FuzzyFinder', ->
|
||||
expect(finder.find('li:eq(1)')).toHaveClass "selected"
|
||||
expect(finder.find('li:eq(2)')).not.toHaveClass "selected"
|
||||
|
||||
it "does not fall off the end or begining of the list", ->
|
||||
it "wraps around when at the end or begining of the list", ->
|
||||
expect(finder.find('li:first')).toHaveClass "selected"
|
||||
|
||||
finder.miniEditor.trigger keydownEvent('up')
|
||||
expect(finder.find('li:first')).toHaveClass "selected"
|
||||
|
||||
for i in [1..finder.pathList.children().length+2]
|
||||
finder.miniEditor.trigger keydownEvent('down')
|
||||
|
||||
expect(finder.find('li:last')).toHaveClass "selected"
|
||||
|
||||
finder.miniEditor.trigger keydownEvent('down')
|
||||
expect(finder.find('li:first')).toHaveClass "selected"
|
||||
|
||||
describe "when the fuzzy finder loses focus", ->
|
||||
it "detaches itself", ->
|
||||
rootView.attachToDom()
|
||||
|
||||
Reference in New Issue
Block a user