diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-05-14 16:31:28 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-05-15 10:01:08 +0000 |
commit | cfbe3e213efed691cddc5f96cfe900544931658a (patch) | |
tree | ce3b72fd92dc59717883486d02daacd97d768286 /uitest/src/com/vaadin/tests/push | |
parent | 40a80c51803a109083d3949039448beeefd7f9da (diff) | |
download | vaadin-framework-cfbe3e213efed691cddc5f96cfe900544931658a.tar.gz vaadin-framework-cfbe3e213efed691cddc5f96cfe900544931658a.zip |
Make Vaadin TB3/4 tests work and run on PhantomJS (#13291)
Change-Id: I0d1747d41b3b9e0a32d995a5cea9081292c8c2c6
Diffstat (limited to 'uitest/src/com/vaadin/tests/push')
3 files changed, 11 insertions, 3 deletions
diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java b/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java index 0443307b2f..8dc960c9ac 100644 --- a/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java +++ b/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java @@ -38,6 +38,8 @@ public class PushConfigurationStreamingTest extends PushConfigurationTest { @Test public void testStreaming() throws InterruptedException { + openDebugLogTab(); + new Select(getTransportSelect()).selectByVisibleText("STREAMING"); new Select(getPushModeSelect()).selectByVisibleText("AUTOMATIC"); diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurationWebSocketTest.java b/uitest/src/com/vaadin/tests/push/PushConfigurationWebSocketTest.java index 2a36059ccb..c9a813fac0 100644 --- a/uitest/src/com/vaadin/tests/push/PushConfigurationWebSocketTest.java +++ b/uitest/src/com/vaadin/tests/push/PushConfigurationWebSocketTest.java @@ -33,6 +33,7 @@ public class PushConfigurationWebSocketTest extends PushConfigurationTest { List<DesiredCapabilities> browsers = super.getBrowsersToTest(); browsers.remove(Browser.IE8.getDesiredCapabilities()); browsers.remove(Browser.IE9.getDesiredCapabilities()); + browsers.remove(Browser.PHANTOMJS.getDesiredCapabilities()); return browsers; } diff --git a/uitest/src/com/vaadin/tests/push/PushErrorHandlingTest.java b/uitest/src/com/vaadin/tests/push/PushErrorHandlingTest.java index c31b167586..1f6e181c89 100644 --- a/uitest/src/com/vaadin/tests/push/PushErrorHandlingTest.java +++ b/uitest/src/com/vaadin/tests/push/PushErrorHandlingTest.java @@ -20,6 +20,7 @@ import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; +import com.vaadin.testbench.elements.LabelElement; import com.vaadin.tests.annotations.TestCategory; import com.vaadin.tests.tb3.MultiBrowserTest; @@ -31,11 +32,15 @@ public class PushErrorHandlingTest extends MultiBrowserTest { setPush(true); openTestURL(); vaadinElementById("npeButton").click(); + int idx = 1; + if (BrowserUtil.isPhantomJS(getDesiredCapabilities())) { + // PhantomJS sends an extra event when page gets loaded. + // This results as an extra error label. + ++idx; + } Assert.assertEquals( "An error! Unable to invoke method click in com.vaadin.shared.ui.button.ButtonServerRpc", - vaadinElement( - "/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[2]/VLabel[0]") - .getText()); + $(LabelElement.class).get(idx).getText()); WebElement table = vaadinElementById("testtable"); WebElement row = table.findElement(By |