Skip to content

Commit

Permalink
Configure to run IE11 tests in production mode (#4306)
Browse files Browse the repository at this point in the history
* 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 435dc81.

* Revert "Wait for shadow-root child in ChildOrderIT"

This reverts commit 1d40a78.

* Revert "Use TestBench queries in ChildOrderIT"

This reverts commit 6deceaa.

* 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
  • Loading branch information
pekam authored and gilberto-torrezan committed Jul 11, 2018
1 parent f3de3a0 commit 2e069cc
Show file tree
Hide file tree
Showing 20 changed files with 28 additions and 17 deletions.
14 changes: 13 additions & 1 deletion flow-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,19 @@
<test.excludegroup></test.excludegroup>
</properties>
</profile>

<profile>
<id>ie11</id>
<activation>
<property>
<!-- In BrowserStack tests are run on IE11 -->
<name>test.use.browserstack</name>
<value>true</value>
</property>
</activation>
<properties>
<test.excludegroup>com.vaadin.flow.testcategory.IgnoreIE11</test.excludegroup>
</properties>
</profile>
</profiles>

</project>
10 changes: 7 additions & 3 deletions flow-tests/test-dev-mode/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
</parent>
<artifactId>flow-test-dev-mode</artifactId>
<name>Flow tests for dev mode</name>
<description>
Tests extracted from flow-test-root-context in order to run
true production mode with transpilation in that module.
</description>
<packaging>war</packaging>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
Expand All @@ -25,19 +29,19 @@
<artifactId>flow-html-components-testbench</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-test-common</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.webjars.bowergithub.polymer</groupId>
<artifactId>polymer</artifactId>
<version>[2.0.0,3)</version>
</dependency>

<dependency>
<groupId>org.webjars.bowergithub.webcomponents</groupId>
<artifactId>webcomponentsjs</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"vaadin-flow-bundle.html":["foo-bar.html"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- Empty File -->
14 changes: 3 additions & 11 deletions flow-tests/test-root-context/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,6 @@
<goals>
<goal>start</goal>
</goals>
<configuration>
<systemProperties>
<systemProperty>
<!-- re-use the test resources already
present in es6 folder -->
<name>vaadin.frontend.url.es5</name>
<value>context://frontend-es6/</value>
</systemProperty>
</systemProperties>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
Expand Down Expand Up @@ -172,7 +162,9 @@
<id>productionMode</id>
<activation>
<property>
<name>vaadin.productionMode</name>
<!-- In BrowserStack tests are run on IE11, and transpilation is needed -->
<name>test.use.browserstack</name>
<value>true</value>
</property>
</activation>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit 2e069cc

Please sign in to comment.