summaryrefslogtreecommitdiffstats
path: root/uitest/src/test
diff options
context:
space:
mode:
authorArtur <artur@vaadin.com>2017-02-02 10:53:03 +0200
committerHenri Sara <henri.sara@gmail.com>2017-02-02 10:53:03 +0200
commite8dae134b150c760efae8d7302f8dba754b7a247 (patch)
tree2908639de318f8535eab9232cda17300cf8f8925 /uitest/src/test
parent697cfcf3d1720022d3b8ea1380ba76b50b2f8e3f (diff)
downloadvaadin-framework-e8dae134b150c760efae8d7302f8dba754b7a247.tar.gz
vaadin-framework-e8dae134b150c760efae8d7302f8dba754b7a247.zip
Fix caption updating in CustomLayout (#8415)
Fixes #8413
Diffstat (limited to 'uitest/src/test')
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutUpdateCaptionTest.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutUpdateCaptionTest.java b/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutUpdateCaptionTest.java
new file mode 100644
index 0000000000..0a778263b0
--- /dev/null
+++ b/uitest/src/test/java/com/vaadin/tests/components/customlayout/CustomLayoutUpdateCaptionTest.java
@@ -0,0 +1,30 @@
+package com.vaadin.tests.components.customlayout;
+
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import com.vaadin.testbench.elements.ButtonElement;
+import com.vaadin.testbench.elements.TextFieldElement;
+import com.vaadin.tests.tb3.SingleBrowserTest;
+
+public class CustomLayoutUpdateCaptionTest extends SingleBrowserTest {
+
+ @Test
+ public void captionUpdated() {
+ openTestURL();
+ List<TextFieldElement> tfs = $(TextFieldElement.class).all();
+ TextFieldElement tf1 = tfs.get(0);
+ TextFieldElement tf2 = tfs.get(1);
+
+ Assert.assertEquals("initial", tf1.getCaption());
+ Assert.assertEquals("initial", tf2.getCaption());
+
+ $(ButtonElement.class).first().click();
+
+ Assert.assertEquals("updated", tf1.getCaption());
+ Assert.assertEquals("updated", tf2.getCaption());
+
+ }
+}