summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/push/BarInUIDL.java
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/push/BarInUIDL.java')
-rw-r--r--uitest/src/com/vaadin/tests/push/BarInUIDL.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/push/BarInUIDL.java b/uitest/src/com/vaadin/tests/push/BarInUIDL.java
index 7e414cc89d..ef2568bebe 100644
--- a/uitest/src/com/vaadin/tests/push/BarInUIDL.java
+++ b/uitest/src/com/vaadin/tests/push/BarInUIDL.java
@@ -16,14 +16,44 @@
package com.vaadin.tests.push;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openqa.selenium.WebElement;
+
+import com.vaadin.annotations.Push;
import com.vaadin.server.VaadinRequest;
+import com.vaadin.shared.ui.ui.Transport;
import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.tests.tb3.MultiBrowserTest;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
+@Push(transport = Transport.STREAMING)
public class BarInUIDL extends AbstractTestUI {
+ public static class BarInUIDLTest extends MultiBrowserTest {
+ @Test
+ public void sendBarInUIDL() {
+ getButton().click();
+ Assert.assertEquals(
+ "Thank you for clicking | bar",
+ vaadinElement(
+ "/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[1]/VLabel[0]")
+ .getText());
+ getButton().click();
+ Assert.assertEquals(
+ "Thank you for clicking | bar",
+ vaadinElement(
+ "/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[2]/VLabel[0]")
+ .getText());
+ }
+
+ private WebElement getButton() {
+ return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VButton[0]");
+ }
+ }
+
/*
* (non-Javadoc)
*