summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorAleksi Hietanen <aleksi@vaadin.com>2017-05-02 18:57:33 +0300
committerHenri Sara <henri.sara@gmail.com>2017-05-02 18:57:33 +0300
commita1c2b2f6764e51acdab16a8cd3234fba1d688005 (patch)
tree518cb87e1701d6cf9bffb6bcfd415ade89f936e7 /uitest
parentbb43a537e05d9d60ef82f1acac41cea6343c8cbb (diff)
downloadvaadin-framework-a1c2b2f6764e51acdab16a8cd3234fba1d688005.tar.gz
vaadin-framework-a1c2b2f6764e51acdab16a8cd3234fba1d688005.zip
HierarchicalDataProvider cache invalidation workaround (#9218)
Workaround for issue in data communication where active keys are dropped incorrectly on the server. See issue #9217
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/treegrid/TreeGridClientSortTest.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/treegrid/TreeGridClientSortTest.java b/uitest/src/test/java/com/vaadin/tests/components/treegrid/TreeGridClientSortTest.java
new file mode 100644
index 0000000000..2000d1388b
--- /dev/null
+++ b/uitest/src/test/java/com/vaadin/tests/components/treegrid/TreeGridClientSortTest.java
@@ -0,0 +1,32 @@
+package com.vaadin.tests.components.treegrid;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+import com.vaadin.testbench.elements.TreeGridElement;
+import com.vaadin.tests.tb3.SingleBrowserTest;
+
+public class TreeGridClientSortTest extends SingleBrowserTest {
+
+ @Override
+ public Class<?> getUIClass() {
+ return TreeGridBasicFeatures.class;
+ }
+
+ @Test
+ public void client_sorting_with_collapse_and_expand() {
+ openTestURL();
+ TreeGridElement grid = $(TreeGridElement.class).first();
+ selectMenuPath("Component", "Features", "Set data provider",
+ "InMemoryHierarchicalDataProvider");
+ grid.getHeaderCell(0, 0).doubleClick();
+ grid.expandWithClick(0);
+ grid.expandWithClick(1);
+ grid.collapseWithClick(0);
+ grid.expandWithClick(0);
+ assertEquals("0 | 2", grid.getCell(0, 0).getText());
+ assertEquals("1 | 2", grid.getCell(1, 0).getText());
+ assertEquals("2 | 2", grid.getCell(2, 0).getText());
+ }
+}