From 13586d288631589aa2ae8bc004010e812fb585ae Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Wed, 2 Nov 2016 11:46:13 -0700 Subject: [PATCH] fix(specs): Add regression test for list-selection --- spec/list-selection-spec.coffee | 7 ++++++- src/pro | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/spec/list-selection-spec.coffee b/spec/list-selection-spec.coffee index c1eb905a9..92894c1df 100644 --- a/spec/list-selection-spec.coffee +++ b/spec/list-selection-spec.coffee @@ -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!')) diff --git a/src/pro b/src/pro index 5365559d1..7175c08bb 160000 --- a/src/pro +++ b/src/pro @@ -1 +1 @@ -Subproject commit 5365559d1452f018145af86dbbb3c8256bd75632 +Subproject commit 7175c08bbd9a86643e271a5b7c520131de0c5d8b