From d3266dfad77b07a00d46fdd5f4ef017203768a21 Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Fri, 18 Jul 2014 16:31:34 +0300 Subject: Fallback to finding disconnected UI based on AtmosphereResource (#14251) Change-Id: Icdac51322a90c32c122a182bc692c4eff3d8285b --- .../tests/push/RefreshCloseConnectionTest.java | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/push/RefreshCloseConnectionTest.java (limited to 'uitest/src/com/vaadin/tests/push/RefreshCloseConnectionTest.java') diff --git a/uitest/src/com/vaadin/tests/push/RefreshCloseConnectionTest.java b/uitest/src/com/vaadin/tests/push/RefreshCloseConnectionTest.java new file mode 100644 index 0000000000..c5c6064555 --- /dev/null +++ b/uitest/src/com/vaadin/tests/push/RefreshCloseConnectionTest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2000-2014 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 java.util.List; + +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.remote.DesiredCapabilities; + +import com.vaadin.tests.tb3.MultiBrowserTest; +import com.vaadin.tests.tb3.WebsocketTest; + +public class RefreshCloseConnectionTest extends MultiBrowserTest { + @Test + public void testSessionRefresh() { + openTestURL(); + + Assert.assertEquals("1. Init", getLogRow(0)); + + openTestURL(); + + Assert.assertEquals("2. Refresh", getLogRow(1)); + Assert.assertEquals("3. Push", getLogRow(0)); + } + + @Override + public List getBrowsersToTest() { + return WebsocketTest.getWebsocketBrowsers(); + } +} -- cgit v1.2.3