]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix adding and modifying multiple rows in Grid (#16905)
authorTeemu Suo-Anttila <teemusa@vaadin.com>
Tue, 24 Feb 2015 11:07:09 +0000 (13:07 +0200)
committerVaadin Code Review <review@vaadin.com>
Tue, 24 Feb 2015 12:41:47 +0000 (12:41 +0000)
Change-Id: Ib3ae8d305f44a78c9bd6f4539ca9cee2a487d269

server/src/com/vaadin/data/RpcDataProviderExtension.java
uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridRowAddRemoveTest.java

index 3acd12d863faf3551295d66dcc5678ae7684d35c..991cb0537d4d96696daade3e5f31f72c6ef44c23 100644 (file)
@@ -21,6 +21,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -715,7 +716,7 @@ public class RpcDataProviderExtension extends AbstractExtension {
     private CellReference cellReference;
 
     /** Set of updated item ids */
-    private Set<Object> updatedItemIds = new HashSet<Object>();
+    private Set<Object> updatedItemIds = new LinkedHashSet<Object>();
 
     /**
      * Queued RPC calls for adding and removing rows. Queue will be handled in
index 8535efb9ef22279f48a23c7512dc613f0b62912f..b7c33519dd03d559b987d54e71394b44daabe507 100644 (file)
@@ -18,12 +18,14 @@ package com.vaadin.tests.components.grid.basicfeatures.server;
 import org.junit.Assert;
 import org.junit.Test;
 
+import com.vaadin.testbench.elements.NotificationElement;
 import com.vaadin.tests.components.grid.basicfeatures.GridBasicFeaturesTest;
 
 public class GridRowAddRemoveTest extends GridBasicFeaturesTest {
 
     @Test
     public void addRows_loadAllAtOnce() {
+        setDebug(true);
         openTestURL();
 
         selectMenuPath("Settings", "Clear log");
@@ -54,4 +56,16 @@ public class GridRowAddRemoveTest extends GridBasicFeaturesTest {
                 "All newly required rows should be fetched in the same round trip.",
                 logContainsText("Requested items 37 - 55"));
     }
+
+    @Test
+    public void testAdd18Rows() {
+        setDebug(true);
+        openTestURL();
+
+        selectMenuPath("Settings", "Clear log");
+        selectMenuPath("Component", "Body rows", "Add 18 rows");
+
+        Assert.assertFalse("An error notification is present.",
+                isElementPresent(NotificationElement.class));
+    }
 }