aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-07-02 15:43:02 +0300
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-07-04 11:41:36 +0300
commit713cd66661adcbc81438f86c292873b0f663cf3c (patch)
treee3d6f24f4d6340a9e4cfbc3dccf41bc4e371198b /uitest/src/test/java/com/vaadin
parentbea01cb0ea4801d3690df99186914e697053ac73 (diff)
downloadvaadin-framework-713cd66661adcbc81438f86c292873b0f663cf3c.tar.gz
vaadin-framework-713cd66661adcbc81438f86c292873b0f663cf3c.zip
Fix expanding an added TreeGrid node (#11018)
Fixes #9997
Diffstat (limited to 'uitest/src/test/java/com/vaadin')
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/treegrid/TreeGridExpandOnAddTest.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/treegrid/TreeGridExpandOnAddTest.java b/uitest/src/test/java/com/vaadin/tests/components/treegrid/TreeGridExpandOnAddTest.java
new file mode 100644
index 0000000000..00908a71e6
--- /dev/null
+++ b/uitest/src/test/java/com/vaadin/tests/components/treegrid/TreeGridExpandOnAddTest.java
@@ -0,0 +1,29 @@
+package com.vaadin.tests.components.treegrid;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+import com.vaadin.testbench.elements.ButtonElement;
+import com.vaadin.testbench.elements.TreeGridElement;
+import com.vaadin.tests.tb3.SingleBrowserTest;
+
+public class TreeGridExpandOnAddTest extends SingleBrowserTest {
+
+ @Test
+ public void testNoException() {
+ setDebug(true);
+ openTestURL();
+
+ $(ButtonElement.class).first().click();
+
+ TreeGridElement treeGrid = $(TreeGridElement.class).first();
+ assertEquals("Parent node not added", "Parent",
+ treeGrid.getCell(0, 0).getText());
+ assertEquals("Child node not added", "Child",
+ treeGrid.getCell(1, 0).getText());
+
+ assertNoErrorNotifications();
+ }
+
+}