aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-05-09 11:32:47 +0300
committerIlia Motornyi <elmot@vaadin.com>2018-05-09 11:32:47 +0300
commit977affb7b8633a7bee43d2fd40a86de21c62492e (patch)
tree0d3ca56ff99550706121f25606eceb417b1e96f4 /test
parent3e82a2b5481aff31c063ba9ed2952b32c5784388 (diff)
downloadvaadin-framework-977affb7b8633a7bee43d2fd40a86de21c62492e.tar.gz
vaadin-framework-977affb7b8633a7bee43d2fd40a86de21c62492e.zip
Fix broken integration tests (#10900)
Diffstat (limited to 'test')
-rw-r--r--test/servlet-containers/generic-tests/src/main/java/com/vaadin/tests/integration/websocket/ServletIntegrationWebsocketIT.java18
-rw-r--r--test/servlet-containers/generic-tests/src/main/java/com/vaadin/tests/integration/websocket/jsr356/ServletIntegrationJSR356WebsocketIT.java3
-rw-r--r--test/widget-set-testutil/src/main/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java3
3 files changed, 22 insertions, 2 deletions
diff --git a/test/servlet-containers/generic-tests/src/main/java/com/vaadin/tests/integration/websocket/ServletIntegrationWebsocketIT.java b/test/servlet-containers/generic-tests/src/main/java/com/vaadin/tests/integration/websocket/ServletIntegrationWebsocketIT.java
index 668f8611a4..817d964da2 100644
--- a/test/servlet-containers/generic-tests/src/main/java/com/vaadin/tests/integration/websocket/ServletIntegrationWebsocketIT.java
+++ b/test/servlet-containers/generic-tests/src/main/java/com/vaadin/tests/integration/websocket/ServletIntegrationWebsocketIT.java
@@ -17,8 +17,11 @@ package com.vaadin.tests.integration.websocket;
import static org.junit.Assert.assertEquals;
+import java.util.HashSet;
+import java.util.Set;
import java.util.stream.Stream;
+import org.junit.Assume;
import org.junit.Test;
import org.openqa.selenium.WebElement;
@@ -29,6 +32,21 @@ public class ServletIntegrationWebsocketIT
extends AbstractServletIntegrationTest {
// Uses the test method declared in the super class
+ private static final Set<String> nonWebsocketServers = new HashSet<>();
+
+ static {
+ nonWebsocketServers.add("liberty-microprofile");
+ }
+
+ @Override
+ public void setup() throws Exception {
+ Assume.assumeFalse("This server does not support Websockets",
+ nonWebsocketServers
+ .contains(System.getProperty("server-name")));
+
+ super.setup();
+ }
+
@Override
protected String getTestPath() {
return "/run/ServletIntegrationWebsocketUI";
diff --git a/test/servlet-containers/generic-tests/src/main/java/com/vaadin/tests/integration/websocket/jsr356/ServletIntegrationJSR356WebsocketIT.java b/test/servlet-containers/generic-tests/src/main/java/com/vaadin/tests/integration/websocket/jsr356/ServletIntegrationJSR356WebsocketIT.java
index 1e703bc4ad..4bb0c2343d 100644
--- a/test/servlet-containers/generic-tests/src/main/java/com/vaadin/tests/integration/websocket/jsr356/ServletIntegrationJSR356WebsocketIT.java
+++ b/test/servlet-containers/generic-tests/src/main/java/com/vaadin/tests/integration/websocket/jsr356/ServletIntegrationJSR356WebsocketIT.java
@@ -30,12 +30,11 @@ public class ServletIntegrationJSR356WebsocketIT
static {
nonJSR356Servers.add("jetty8");
- nonJSR356Servers.add("liberty-microprofile");
}
@Override
public void setup() throws Exception {
- Assume.assumeFalse("Jetty 8 does not support JSR356",
+ Assume.assumeFalse("This server does not support JSR356",
nonJSR356Servers.contains(System.getProperty("server-name")));
super.setup();
diff --git a/test/widget-set-testutil/src/main/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java b/test/widget-set-testutil/src/main/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java
index 28657067d3..b53a81ad39 100644
--- a/test/widget-set-testutil/src/main/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java
+++ b/test/widget-set-testutil/src/main/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java
@@ -69,6 +69,9 @@ public abstract class AbstractWidgetSetIT extends TestBenchTestCase {
}
protected void assertHasDebugMessage(String message) {
+ // Make sure the correct debug window tab is open.
+ findElements(By.className("v-debugwindow-tab")).get(0).click();
+
List<WebElement> elements = getDriver().findElements(
By.xpath("//span[@class='v-debugwindow-message']"));
boolean found = false;