diff options
author | Jonatan Kronqvist <jonatan@vaadin.com> | 2014-04-14 11:53:11 +0300 |
---|---|---|
committer | Jonatan Kronqvist <jonatan@vaadin.com> | 2014-04-14 12:06:05 +0300 |
commit | 416e2f97bcaf93e4d2a782149a963fca95b8400e (patch) | |
tree | eac6d22107b7c2d7bf6371e5278078f02bb860e9 /uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java | |
parent | d2e24feb09ccba7f3a2f253687488774af2bc340 (diff) | |
parent | eda9edcbde781d29ff5939defb61ba5fb159e206 (diff) | |
download | vaadin-framework-416e2f97bcaf93e4d2a782149a963fca95b8400e.tar.gz vaadin-framework-416e2f97bcaf93e4d2a782149a963fca95b8400e.zip |
Merge branch 'master' into 7.2
72d0aa0 Update Window Javadoc based on 7.2 API review changes
ee203f5 Apply abstract ordered layout settings for replaced component (#13568)
02998d8 Updated Window API based on 7.2 API review
cd94b21 Discourage use of setNeedsLayout while a layout is running (#13542)
f374bc7 Make ComboBox always immediate (#4054)
aec102a Update 3rd party license information (#13449)
013d32d Remove old widget from tab content on replace (#12931).
3d0ff32 Prevent duplicate detach() calls with push (#13261)
a452bad Refactor VaadinPortletRequest extending. (#13551)
55dfd29 Prevent duplicate session destroy events (#12612)
2067d4e Don't allocate unnecessary memory for empty array of Objects in MethodProperty (#10446).
00a9af5 Refactor PushConfigurationTest.
Merge: no
Change-Id: I6563769a77f91a68cfeadcb3306dd71fe431863c
Diffstat (limited to 'uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java b/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java new file mode 100644 index 0000000000..46fcc5f44b --- /dev/null +++ b/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2000-2013 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.push; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.MatcherAssert.assertThat; + +import java.util.List; + +import org.junit.Test; +import org.openqa.selenium.remote.DesiredCapabilities; +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 { + new Select(getTransportSelect()).selectByVisibleText("STREAMING"); + new Select(getPushModeSelect()).selectByVisibleText("AUTOMATIC"); + + assertThat(getStatusText(), + containsString("fallbackTransport: long-polling")); + assertThat(getStatusText(), containsString("transport: streaming")); + + waitForServerCounterToUpdate(); + + // 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")); + } +}
\ No newline at end of file |