From 2e069cca19508fbe2cd74c03f86cc9c2b9ed9588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pekka=20Maanp=C3=A4=C3=A4?= Date: Thu, 21 Jun 2018 12:41:11 +0300 Subject: [PATCH] Configure to run IE11 tests in production mode (#4306) * Trigger productionMode and IgnoreIE11 in BrowserStack * Revert productionMode activation * activate production mode only on browserstack property * Use TestBench queries in ChildOrderIT * Improve browser checking in BodyScrollIT * Try to fix CompositeIT with waitForElementPresent * Wait for shadow-root child in ChildOrderIT * Increase timeout for ChildOrderIT * Revert "Increase timeout for ChildOrderIT" This reverts commit 435dc81a2608af2bdf1dae7ce63a76208438ef16. * Revert "Wait for shadow-root child in ChildOrderIT" This reverts commit 1d40a782ea3d17e344cff026cc8cadf893ee0c7c. * Revert "Use TestBench queries in ChildOrderIT" This reverts commit 6deceaaace0021951d7796617e3595b0851144cd. * Merge branch 'master' into ie11-conf * Remove es5 folder config * Move ExportedJSFunction tests out of test-root-context * Move ClientSideExceptionHandling tests out of test-root-context * Move InfoIT out of test-root-context * Move frontend protocol tests out of test-root-context * Add description for flow-test-dev-mode * Merge branch 'master' into ie11-conf --- flow-tests/pom.xml | 14 +++++++++++++- flow-tests/test-dev-mode/pom.xml | 10 +++++++--- .../uitest/ui/ClientSideExceptionHandlingView.java | 0 .../flow/uitest/ui/ExportedJSFunctionView.java | 0 .../java/com/vaadin/flow/uitest/ui/InfoView.java | 0 .../ui/frontend/FrontendProtocolTemplate.java | 0 .../uitest/ui/frontend/FrontendProtocolView.java | 0 .../frontend-es6/components/frontend-protocol.html | 0 .../flow/uitest/components/frontend-protocol.html | 0 .../flow/uitest/vaadin-flow-bundle-manifest.json | 1 + .../com/vaadin/flow/uitest/vaadin-flow-bundle.html | 1 + .../frontend/components/frontend-protocol.html | 0 .../main/webapp/frontend/externalErrorTrigger.js | 0 .../uitest/ui/ClientSideExceptionHandlingIT.java | 0 .../flow/uitest/ui/ExportedJSFunctionIT.java | 0 .../java/com/vaadin/flow/uitest/ui/InfoIT.java | 0 .../uitest/ui/frontend/FrontendProtocolIT.java | 0 flow-tests/test-root-context/pom.xml | 14 +++----------- .../com/vaadin/flow/uitest/ui/BodyScrollIT.java | 4 ++-- .../com/vaadin/flow/uitest/ui/CompositeIT.java | 1 + 20 files changed, 28 insertions(+), 17 deletions(-) rename flow-tests/{test-root-context => test-dev-mode}/src/main/java/com/vaadin/flow/uitest/ui/ClientSideExceptionHandlingView.java (100%) rename flow-tests/{test-root-context => test-dev-mode}/src/main/java/com/vaadin/flow/uitest/ui/ExportedJSFunctionView.java (100%) rename flow-tests/{test-root-context => test-dev-mode}/src/main/java/com/vaadin/flow/uitest/ui/InfoView.java (100%) rename flow-tests/{test-root-context => test-dev-mode}/src/main/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolTemplate.java (100%) rename flow-tests/{test-root-context => test-dev-mode}/src/main/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolView.java (100%) rename flow-tests/{test-root-context => test-dev-mode}/src/main/webapp/frontend-es6/components/frontend-protocol.html (100%) rename flow-tests/{test-root-context => test-dev-mode}/src/main/webapp/frontend/com/vaadin/flow/uitest/components/frontend-protocol.html (100%) create mode 100644 flow-tests/test-dev-mode/src/main/webapp/frontend/com/vaadin/flow/uitest/vaadin-flow-bundle-manifest.json create mode 100644 flow-tests/test-dev-mode/src/main/webapp/frontend/com/vaadin/flow/uitest/vaadin-flow-bundle.html rename flow-tests/{test-root-context => test-dev-mode}/src/main/webapp/frontend/components/frontend-protocol.html (100%) rename flow-tests/{test-root-context => test-dev-mode}/src/main/webapp/frontend/externalErrorTrigger.js (100%) rename flow-tests/{test-root-context => test-dev-mode}/src/test/java/com/vaadin/flow/uitest/ui/ClientSideExceptionHandlingIT.java (100%) rename flow-tests/{test-root-context => test-dev-mode}/src/test/java/com/vaadin/flow/uitest/ui/ExportedJSFunctionIT.java (100%) rename flow-tests/{test-root-context => test-dev-mode}/src/test/java/com/vaadin/flow/uitest/ui/InfoIT.java (100%) rename flow-tests/{test-root-context => test-dev-mode}/src/test/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolIT.java (100%) diff --git a/flow-tests/pom.xml b/flow-tests/pom.xml index 96a5a8dbe30..7e4410025a2 100644 --- a/flow-tests/pom.xml +++ b/flow-tests/pom.xml @@ -213,7 +213,19 @@ - + + ie11 + + + + test.use.browserstack + true + + + + com.vaadin.flow.testcategory.IgnoreIE11 + + diff --git a/flow-tests/test-dev-mode/pom.xml b/flow-tests/test-dev-mode/pom.xml index 5a7d6372465..8290b353b2a 100644 --- a/flow-tests/test-dev-mode/pom.xml +++ b/flow-tests/test-dev-mode/pom.xml @@ -9,6 +9,10 @@ flow-test-dev-mode Flow tests for dev mode + + Tests extracted from flow-test-root-context in order to run + true production mode with transpilation in that module. + war true @@ -25,19 +29,19 @@ flow-html-components-testbench ${project.version} - + com.vaadin flow-test-common ${project.version} - + org.webjars.bowergithub.polymer polymer [2.0.0,3) - + org.webjars.bowergithub.webcomponents webcomponentsjs diff --git a/flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/ClientSideExceptionHandlingView.java b/flow-tests/test-dev-mode/src/main/java/com/vaadin/flow/uitest/ui/ClientSideExceptionHandlingView.java similarity index 100% rename from flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/ClientSideExceptionHandlingView.java rename to flow-tests/test-dev-mode/src/main/java/com/vaadin/flow/uitest/ui/ClientSideExceptionHandlingView.java diff --git a/flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/ExportedJSFunctionView.java b/flow-tests/test-dev-mode/src/main/java/com/vaadin/flow/uitest/ui/ExportedJSFunctionView.java similarity index 100% rename from flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/ExportedJSFunctionView.java rename to flow-tests/test-dev-mode/src/main/java/com/vaadin/flow/uitest/ui/ExportedJSFunctionView.java diff --git a/flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/InfoView.java b/flow-tests/test-dev-mode/src/main/java/com/vaadin/flow/uitest/ui/InfoView.java similarity index 100% rename from flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/InfoView.java rename to flow-tests/test-dev-mode/src/main/java/com/vaadin/flow/uitest/ui/InfoView.java diff --git a/flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolTemplate.java b/flow-tests/test-dev-mode/src/main/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolTemplate.java similarity index 100% rename from flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolTemplate.java rename to flow-tests/test-dev-mode/src/main/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolTemplate.java diff --git a/flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolView.java b/flow-tests/test-dev-mode/src/main/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolView.java similarity index 100% rename from flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolView.java rename to flow-tests/test-dev-mode/src/main/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolView.java diff --git a/flow-tests/test-root-context/src/main/webapp/frontend-es6/components/frontend-protocol.html b/flow-tests/test-dev-mode/src/main/webapp/frontend-es6/components/frontend-protocol.html similarity index 100% rename from flow-tests/test-root-context/src/main/webapp/frontend-es6/components/frontend-protocol.html rename to flow-tests/test-dev-mode/src/main/webapp/frontend-es6/components/frontend-protocol.html diff --git a/flow-tests/test-root-context/src/main/webapp/frontend/com/vaadin/flow/uitest/components/frontend-protocol.html b/flow-tests/test-dev-mode/src/main/webapp/frontend/com/vaadin/flow/uitest/components/frontend-protocol.html similarity index 100% rename from flow-tests/test-root-context/src/main/webapp/frontend/com/vaadin/flow/uitest/components/frontend-protocol.html rename to flow-tests/test-dev-mode/src/main/webapp/frontend/com/vaadin/flow/uitest/components/frontend-protocol.html diff --git a/flow-tests/test-dev-mode/src/main/webapp/frontend/com/vaadin/flow/uitest/vaadin-flow-bundle-manifest.json b/flow-tests/test-dev-mode/src/main/webapp/frontend/com/vaadin/flow/uitest/vaadin-flow-bundle-manifest.json new file mode 100644 index 00000000000..5bf1623b07e --- /dev/null +++ b/flow-tests/test-dev-mode/src/main/webapp/frontend/com/vaadin/flow/uitest/vaadin-flow-bundle-manifest.json @@ -0,0 +1 @@ +{"vaadin-flow-bundle.html":["foo-bar.html"]} \ No newline at end of file diff --git a/flow-tests/test-dev-mode/src/main/webapp/frontend/com/vaadin/flow/uitest/vaadin-flow-bundle.html b/flow-tests/test-dev-mode/src/main/webapp/frontend/com/vaadin/flow/uitest/vaadin-flow-bundle.html new file mode 100644 index 00000000000..4078a8fa5fe --- /dev/null +++ b/flow-tests/test-dev-mode/src/main/webapp/frontend/com/vaadin/flow/uitest/vaadin-flow-bundle.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/flow-tests/test-root-context/src/main/webapp/frontend/components/frontend-protocol.html b/flow-tests/test-dev-mode/src/main/webapp/frontend/components/frontend-protocol.html similarity index 100% rename from flow-tests/test-root-context/src/main/webapp/frontend/components/frontend-protocol.html rename to flow-tests/test-dev-mode/src/main/webapp/frontend/components/frontend-protocol.html diff --git a/flow-tests/test-root-context/src/main/webapp/frontend/externalErrorTrigger.js b/flow-tests/test-dev-mode/src/main/webapp/frontend/externalErrorTrigger.js similarity index 100% rename from flow-tests/test-root-context/src/main/webapp/frontend/externalErrorTrigger.js rename to flow-tests/test-dev-mode/src/main/webapp/frontend/externalErrorTrigger.js diff --git a/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/ClientSideExceptionHandlingIT.java b/flow-tests/test-dev-mode/src/test/java/com/vaadin/flow/uitest/ui/ClientSideExceptionHandlingIT.java similarity index 100% rename from flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/ClientSideExceptionHandlingIT.java rename to flow-tests/test-dev-mode/src/test/java/com/vaadin/flow/uitest/ui/ClientSideExceptionHandlingIT.java diff --git a/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/ExportedJSFunctionIT.java b/flow-tests/test-dev-mode/src/test/java/com/vaadin/flow/uitest/ui/ExportedJSFunctionIT.java similarity index 100% rename from flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/ExportedJSFunctionIT.java rename to flow-tests/test-dev-mode/src/test/java/com/vaadin/flow/uitest/ui/ExportedJSFunctionIT.java diff --git a/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/InfoIT.java b/flow-tests/test-dev-mode/src/test/java/com/vaadin/flow/uitest/ui/InfoIT.java similarity index 100% rename from flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/InfoIT.java rename to flow-tests/test-dev-mode/src/test/java/com/vaadin/flow/uitest/ui/InfoIT.java diff --git a/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolIT.java b/flow-tests/test-dev-mode/src/test/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolIT.java similarity index 100% rename from flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolIT.java rename to flow-tests/test-dev-mode/src/test/java/com/vaadin/flow/uitest/ui/frontend/FrontendProtocolIT.java diff --git a/flow-tests/test-root-context/pom.xml b/flow-tests/test-root-context/pom.xml index d074b2a60ab..da06a0c885b 100644 --- a/flow-tests/test-root-context/pom.xml +++ b/flow-tests/test-root-context/pom.xml @@ -92,16 +92,6 @@ start - - - - - vaadin.frontend.url.es5 - context://frontend-es6/ - - - stop-jetty @@ -172,7 +162,9 @@ productionMode - vaadin.productionMode + + test.use.browserstack + true diff --git a/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/BodyScrollIT.java b/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/BodyScrollIT.java index d56e5135a0e..3a7ac4f05d4 100644 --- a/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/BodyScrollIT.java +++ b/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/BodyScrollIT.java @@ -18,9 +18,9 @@ import org.junit.Assert; import org.junit.Test; import org.openqa.selenium.By; -import org.openqa.selenium.ie.InternetExplorerDriver; import com.vaadin.flow.testutil.ChromeBrowserTest; +import com.vaadin.testbench.parallel.BrowserUtil; public class BodyScrollIT extends ChromeBrowserTest { @@ -31,7 +31,7 @@ public void noScrollAttributeForBody() { String scrollAttribute = findElement(By.tagName("body")) .getAttribute("scroll"); - if (getDriver() instanceof InternetExplorerDriver) { + if (BrowserUtil.isIE(getDesiredCapabilities())) { Assert.assertTrue("The 'scroll' attribute of body should be empty", scrollAttribute.isEmpty()); } else { diff --git a/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/CompositeIT.java b/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/CompositeIT.java index 978b44dbe5a..90f280c5252 100644 --- a/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/CompositeIT.java +++ b/flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/CompositeIT.java @@ -51,6 +51,7 @@ public void changeOnClient() { @Test public void htmlImportOfContentLoaded() { open(); + waitForElementPresent(By.id(CompositeView.COMPOSITE_PAPER_SLIDER)); TestBenchElement paperSlider = (TestBenchElement) findElement( By.id(CompositeView.COMPOSITE_PAPER_SLIDER)); Assert.assertEquals("100", paperSlider.getPropertyString("max"));