mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
fix(specs): Add regression test for list-selection
This commit is contained in:
parent
d996273b7b
commit
13586d2886
2 changed files with 7 additions and 2 deletions
|
@ -134,11 +134,16 @@ describe "ListSelection", ->
|
|||
it "should throw an exception if the item passed is not a model", ->
|
||||
expect( => @selection.expandTo('hi')).toThrow()
|
||||
|
||||
it "should select all items from the last selected item to the provided item", ->
|
||||
it "should select all items from the last selected item to the provided item when the provided item is below the current selection", ->
|
||||
@selection.set([@items[2], @items[5]])
|
||||
@selection.expandTo(@items[8])
|
||||
expect(@selection.ids()).toEqual(['2','5','6','7','8'])
|
||||
|
||||
it "should select all items from the last selected item to the provided item when the provided item is above the current selection", ->
|
||||
@selection.set([@items[7], @items[5]])
|
||||
@selection.expandTo(@items[2])
|
||||
expect(@selection.ids()).toEqual(['7', '5', '4', '3', '2'])
|
||||
|
||||
it "should not do anything if the provided item is not in the view set", ->
|
||||
@selection.set([@items[2]])
|
||||
@selection.expandTo(new Thread(id:'not-in-view!'))
|
||||
|
|
2
src/pro
2
src/pro
|
@ -1 +1 @@
|
|||
Subproject commit 5365559d1452f018145af86dbbb3c8256bd75632
|
||||
Subproject commit 7175c08bbd9a86643e271a5b7c520131de0c5d8b
|
Loading…
Reference in a new issue