summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2014-12-19 08:31:03 +0200
committerTeemu Suo-Anttila <teemusa@vaadin.com>2014-12-19 09:47:52 +0200
commitab07a2ef324c13614cea34bf2efd84aee75edcd0 (patch)
tree159fb534d85b8ac9754fdb74ab33a77fde1c743f /uitest
parente4aa47017a1d99ad6dcc3e68a86a7014b0c59e28 (diff)
downloadvaadin-framework-ab07a2ef324c13614cea34bf2efd84aee75edcd0.tar.gz
vaadin-framework-ab07a2ef324c13614cea34bf2efd84aee75edcd0.zip
Fix cache updating in AbstractRemoteDataSource on row remove (#13334)
Also contains a minor performance tweak for row adding in start of the cache and updates to cell focus logic. Change-Id: Ia64e43dd5ae8777014885b5e7dd05cb31b54eae2
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java
index 337293d687..d9d1acb4c1 100644
--- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java
+++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridStructureTest.java
@@ -382,6 +382,28 @@ public class GridStructureTest extends GridBasicFeaturesTest {
assertEquals("Grid scrolled unexpectedly", cellContent, cell.getText());
}
+ @Test
+ public void testRemoveAndAddRowAboveViewport() {
+ setDebug(true);
+ openTestURL();
+
+ GridCellElement cell = getGridElement().getCell(500, 1);
+ String cellContent = cell.getText();
+ selectMenuPath("Component", "Body rows", "Remove first row");
+
+ assertFalse("Error notification was present after removing row",
+ isElementPresent(NotificationElement.class));
+
+ assertEquals("Grid scrolled unexpectedly", cellContent, cell.getText());
+
+ selectMenuPath("Component", "Body rows", "Add first row");
+
+ assertFalse("Error notification was present after adding row",
+ isElementPresent(NotificationElement.class));
+
+ assertEquals("Grid scrolled unexpectedly", cellContent, cell.getText());
+ }
+
private void assertPrimaryStylename(String stylename) {
assertTrue(getGridElement().getAttribute("class").contains(stylename));