diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/push')
-rw-r--r-- | uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java | 22 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/push/ReconnectTest.java | 26 |
2 files changed, 4 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(); |