From 189d104051c00b9aea9f7b9e27e0a4e68a408ae5 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Fri, 23 Jan 2015 13:16:19 +0200 Subject: Fix RpcDataProvider cache clearing on bare ItemSetChange (#16481) This patch optimizes value change listeners and updates a bit in order to make clean up on cache invalidation easier to perform. Change-Id: I6ae3e0ef5046bd5f404f5e0a440607cabd48c6a4 --- .../basicfeatures/server/GridSelectionTest.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'uitest') diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridSelectionTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridSelectionTest.java index b178325c6a..3dbf613ba0 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridSelectionTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridSelectionTest.java @@ -20,6 +20,7 @@ import static org.junit.Assert.assertTrue; import org.junit.Test; import org.openqa.selenium.Keys; +import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; import com.vaadin.testbench.By; @@ -213,6 +214,27 @@ public class GridSelectionTest extends GridBasicFeaturesTest { .isSelected()); } + @Test + public void testSelectAllAndSort() { + openTestURL(); + + setSelectionModelMulti(); + GridCellElement header = getGridElement().getHeaderCell(0, 0); + + header.findElement(By.tagName("input")).click(); + + getGridElement().getHeaderCell(0, 1).click(); + + WebElement selectionBox = getGridElement().getCell(4, 0).findElement( + By.tagName("input")); + selectionBox.click(); + selectionBox.click(); + + assertFalse( + "Exception occured on row reselection.", + logContainsText("Exception occured, java.lang.IllegalStateException: No item id for key 101 found.")); + } + @Test public void testSelectAllCheckboxWhenChangingModels() { openTestURL(); -- cgit v1.2.3