diff options
author | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2018-05-03 09:47:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-03 09:47:47 +0300 |
commit | 4e228795042f2e4c41d9a5e8a3f2e336da77426c (patch) | |
tree | 0191b9ba8ff4291bee42718106e97de28a5567f5 /test | |
parent | c6ce3887d7862f73a7a0eaf421653e8c7336a296 (diff) | |
download | vaadin-framework-4e228795042f2e4c41d9a5e8a3f2e336da77426c.tar.gz vaadin-framework-4e228795042f2e4c41d9a5e8a3f2e336da77426c.zip |
Fix usage of debug window in websocket test (#10868)
Diffstat (limited to 'test')
2 files changed, 7 insertions, 8 deletions
diff --git a/test/servlet-containers/generic-tests/src/main/java/com/vaadin/tests/integration/AbstractIntegrationTest.java b/test/servlet-containers/generic-tests/src/main/java/com/vaadin/tests/integration/AbstractIntegrationTest.java index 21dca1cf57..90bec7ae48 100644 --- a/test/servlet-containers/generic-tests/src/main/java/com/vaadin/tests/integration/AbstractIntegrationTest.java +++ b/test/servlet-containers/generic-tests/src/main/java/com/vaadin/tests/integration/AbstractIntegrationTest.java @@ -44,12 +44,12 @@ public abstract class AbstractIntegrationTest extends ParallelTest { testBench().resizeViewPortTo(SCREENSHOT_WIDTH, SCREENSHOT_HEIGHT); - openTestURL(); + openTestURL(getParameters()); } - private void openTestURL() { + protected void openTestURL(Stream<String> parameters) { String url = getDeploymentURL() + getContextPath() + getTestPath() + "?" - + getParameters().collect(Collectors.joining("&")); + + parameters.collect(Collectors.joining("&")); driver.get(url); 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 3a722768e4..668f8611a4 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 @@ -36,6 +36,10 @@ public class ServletIntegrationWebsocketIT @Test public void testWebsockedUsed() { + // Reopen the page with debug window + openTestURL( + Stream.concat(getParameters(), Stream.of("debug")).distinct()); + // Make sure the correct debug window tab is open. findElements(By.className("v-debugwindow-tab")).get(1).click(); @@ -51,9 +55,4 @@ public class ServletIntegrationWebsocketIT assertEquals("Client to server: websocket, server to client: websocket", row.findElement(By.className("value")).getText()); } - - protected Stream<String> getParameters() { - return Stream.concat(super.getParameters(), Stream.of("debug")) - .distinct(); - } } |