summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2014-06-27 10:34:42 +0300
committerSauli Tähkäpää <sauli@vaadin.com>2014-06-27 13:35:15 +0300
commitd8f1d1ebfbe5bdae8e3fbaafc2d5513245528c94 (patch)
treec3c05c9ff9b7caad1ddc1eca422491c82064b3bb /uitest/src/com/vaadin
parent75278f98c648a483d32a42655115b9b0e01c15b9 (diff)
downloadvaadin-framework-d8f1d1ebfbe5bdae8e3fbaafc2d5513245528c94.tar.gz
vaadin-framework-d8f1d1ebfbe5bdae8e3fbaafc2d5513245528c94.zip
Fix PushConfigurationStreamingTest for IE.
Change-Id: Iac342bdca90794a02c5966231142a585e2eeb216
Diffstat (limited to 'uitest/src/com/vaadin')
-rw-r--r--uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java22
-rw-r--r--uitest/src/com/vaadin/tests/push/ReconnectTest.java26
-rw-r--r--uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java30
3 files changed, 34 insertions, 44 deletions
diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java b/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java
index 8dc960c9ac..0861e618a2 100644
--- a/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java
+++ b/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java
@@ -27,33 +27,19 @@ import org.openqa.selenium.support.ui.Select;
public class PushConfigurationStreamingTest extends PushConfigurationTest {
- @Override
- public List<DesiredCapabilities> getBrowsersToTest() {
- List<DesiredCapabilities> browsers = super.getBrowsersToTest();
-
- browsers.remove(Browser.IE8.getDesiredCapabilities());
-
- return browsers;
- }
-
@Test
public void testStreaming() throws InterruptedException {
openDebugLogTab();
new Select(getTransportSelect()).selectByVisibleText("STREAMING");
- new Select(getPushModeSelect()).selectByVisibleText("AUTOMATIC");
-
assertThat(getStatusText(),
containsString("fallbackTransport: long-polling"));
assertThat(getStatusText(), containsString("transport: streaming"));
- waitForServerCounterToUpdate();
+ clearDebugMessages();
+ new Select(getPushModeSelect()).selectByVisibleText("AUTOMATIC");
- // Use debug console to verify we used the correct transport type
- assertThat(
- driver.getPageSource(),
- not(containsString("Push connection established using websocket")));
- assertThat(driver.getPageSource(),
- containsString("Push connection established using streaming"));
+ waitForDebugMessage("Push connection established using streaming", 10);
+ waitForServerCounterToUpdate();
}
}
diff --git a/uitest/src/com/vaadin/tests/push/ReconnectTest.java b/uitest/src/com/vaadin/tests/push/ReconnectTest.java
index 5ad2e7a127..6a632f2667 100644
--- a/uitest/src/com/vaadin/tests/push/ReconnectTest.java
+++ b/uitest/src/com/vaadin/tests/push/ReconnectTest.java
@@ -83,32 +83,6 @@ public abstract class ReconnectTest extends MultiBrowserTestWithProxy {
waitForDebugMessage("Reopening push connection");
}
- private void clearDebugMessages() {
- driver.findElement(
- By.xpath("//button[@class='v-debugwindow-button' and @title='Clear log']"))
- .click();
- }
-
- private boolean hasDebugMessage(String message) {
- return getDebugMessage(message) != null;
- }
-
- private WebElement getDebugMessage(String message) {
- return driver.findElement(By.xpath(String.format(
- "//span[@class='v-debugwindow-message' and text()='%s']",
- message)));
- }
-
- private void waitForDebugMessage(final String expectedMessage) {
- waitUntil(new ExpectedCondition<Boolean>() {
-
- @Override
- public Boolean apply(WebDriver input) {
- return hasDebugMessage(expectedMessage);
- }
- }, 30);
- }
-
private void connectAndVerifyConnectionEstablished() throws JSchException {
connectProxy();
waitUntilServerCounterChanges();
diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
index 14be226de6..e5cceca6b8 100644
--- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
+++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java
@@ -165,6 +165,36 @@ public abstract class AbstractTB3Test extends TestBenchTestCase {
return ((Locatable) element.getWrappedElement()).getCoordinates();
}
+ private boolean hasDebugMessage(String message) {
+ return getDebugMessage(message) != null;
+ }
+
+ private WebElement getDebugMessage(String message) {
+ return driver.findElement(By.xpath(String.format(
+ "//span[@class='v-debugwindow-message' and text()='%s']",
+ message)));
+ }
+
+ protected void waitForDebugMessage(final String expectedMessage) {
+ waitForDebugMessage(expectedMessage, 30);
+ }
+
+ protected void waitForDebugMessage(final String expectedMessage, int timeout) {
+ waitUntil(new ExpectedCondition<Boolean>() {
+
+ @Override
+ public Boolean apply(WebDriver input) {
+ return hasDebugMessage(expectedMessage);
+ }
+ }, timeout);
+ }
+
+ protected void clearDebugMessages() {
+ driver.findElement(
+ By.xpath("//button[@class='v-debugwindow-button' and @title='Clear log']"))
+ .click();
+ }
+
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface RunLocally {