diff options
author | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2017-01-09 13:41:30 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-01-09 13:41:30 +0200 |
commit | 886a837d6d16216606dcb564c5450e1b6bf136d3 (patch) | |
tree | cf7a38c71f8e982e1f5b26f32c1d10caac5cf05a | |
parent | 4fd968314f47338c0ea61025e6a22f036f8e725d (diff) | |
download | vaadin-framework-886a837d6d16216606dcb564c5450e1b6bf136d3.tar.gz vaadin-framework-886a837d6d16216606dcb564c5450e1b6bf136d3.zip |
Fix vaadin-test and all its submodules (#8076)
This patch applies following fixes:
* ContextMenu with correct version for Vaadin 8
* Correctly skip install plugin for test submodules
* Make widgetset-test-util a test depdendency, don't use test-jar
* Fix vaadin-test project structure and dependencies
* Clean up testutil pom
* Add README.md
18 files changed, 106 insertions, 136 deletions
diff --git a/.gitignore b/.gitignore index d55a19aa04..0139179982 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,5 @@ phantomjsdriver.log */.checkstyle +# TB default error screenshot folder +error-screenshots/ diff --git a/test/README.md b/test/README.md new file mode 100644 index 0000000000..ca9e61c57c --- /dev/null +++ b/test/README.md @@ -0,0 +1,5 @@ +This is a test project to verify the basic functionality of various related plugins and addons. + +To validate a given Vaadin Version, run `mvn clean verify -Dvaadin.version=VERSIONNUMBER` + +Note that `mvn clean install` needs to be executed in the top-level test project or in the widget-set-testutil subproject before running tests for any individual submodule. diff --git a/test/addon-using-init-param-widget-set/pom.xml b/test/addon-using-init-param-widget-set/pom.xml index 79939e6b1b..abae3e8347 100644 --- a/test/addon-using-init-param-widget-set/pom.xml +++ b/test/addon-using-init-param-widget-set/pom.xml @@ -14,25 +14,16 @@ <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-test-widget-set-testutil</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>com.vaadin</groupId> - <artifactId>vaadin-test-widget-set-testutil</artifactId> - <version>${project.version}</version> - <type>test-jar</type> - <scope>test</scope> </dependency> <!-- Included to ensure AppWidgetset is an option --> <dependency> - <groupId>com.vaadin.addon</groupId> + <groupId>com.vaadin</groupId> <artifactId>vaadin-context-menu</artifactId> - <version>0.7.4</version> + <version>${contextmenu.version}</version> </dependency> <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-client-compiled</artifactId> - <version>${project.version}</version> </dependency> </dependencies> @@ -42,6 +33,7 @@ <plugin> <groupId>com.vaadin</groupId> <artifactId>vaadin-maven-plugin</artifactId> + <version>${vaadin.plugin.version}</version> <executions> <execution> <goals> diff --git a/test/addon-using-init-param-widget-set/src/main/java/com/vaadin/test/addonusinginitparamwidgetset/AddonUsingInitParamWidgetSetUI.java b/test/addon-using-init-param-widget-set/src/main/java/com/vaadin/test/addonusinginitparamwidgetset/AddonUsingInitParamWidgetSetUI.java index 41a240e006..06324af3ca 100644 --- a/test/addon-using-init-param-widget-set/src/main/java/com/vaadin/test/addonusinginitparamwidgetset/AddonUsingInitParamWidgetSetUI.java +++ b/test/addon-using-init-param-widget-set/src/main/java/com/vaadin/test/addonusinginitparamwidgetset/AddonUsingInitParamWidgetSetUI.java @@ -3,8 +3,8 @@ package com.vaadin.test.addonusinginitparamwidgetset; import javax.servlet.annotation.WebInitParam; import javax.servlet.annotation.WebServlet; -import com.vaadin.addon.contextmenu.ContextMenu; import com.vaadin.annotations.VaadinServletConfiguration; +import com.vaadin.contextmenu.ContextMenu; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinServlet; import com.vaadin.test.widgetset.AbstractTestWidgetSetUI; diff --git a/test/addon-using-init-param-widget-set/src/test/java/com/vaadin/test/addonusinginitparamwidgetset/AddonUsingInitParamWidgetSetIT.java b/test/addon-using-init-param-widget-set/src/test/java/com/vaadin/test/addonusinginitparamwidgetset/AddonUsingInitParamWidgetSetIT.java index 11f0d74ce2..7badc066c9 100644 --- a/test/addon-using-init-param-widget-set/src/test/java/com/vaadin/test/addonusinginitparamwidgetset/AddonUsingInitParamWidgetSetIT.java +++ b/test/addon-using-init-param-widget-set/src/test/java/com/vaadin/test/addonusinginitparamwidgetset/AddonUsingInitParamWidgetSetIT.java @@ -10,7 +10,7 @@ public class AddonUsingInitParamWidgetSetIT extends AbstractWidgetSetIT { public void appStartsUserCanInteract() { testAppStartsUserCanInteract("com.vaadin.DefaultWidgetSet", true); assertHasDebugMessage( - "does not contain an implementation for com.vaadin.addon.contextmenu.ContextMenu"); + "does not contain an implementation for com.vaadin.contextmenu.ContextMenu"); } }
\ No newline at end of file diff --git a/test/addon-using-no-defined-widget-set/pom.xml b/test/addon-using-no-defined-widget-set/pom.xml index 97178f94f8..231c8af5d8 100644 --- a/test/addon-using-no-defined-widget-set/pom.xml +++ b/test/addon-using-no-defined-widget-set/pom.xml @@ -14,19 +14,11 @@ <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-test-widget-set-testutil</artifactId> - <version>${project.version}</version> </dependency> <dependency> <groupId>com.vaadin</groupId> - <artifactId>vaadin-test-widget-set-testutil</artifactId> - <version>${project.version}</version> - <type>test-jar</type> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.vaadin.addon</groupId> <artifactId>vaadin-context-menu</artifactId> - <version>0.7.4</version> + <version>${contextmenu.version}</version> </dependency> </dependencies> @@ -36,6 +28,7 @@ <plugin> <groupId>com.vaadin</groupId> <artifactId>vaadin-maven-plugin</artifactId> + <version>${vaadin.plugin.version}</version> <executions> <execution> <goals> diff --git a/test/addon-using-no-defined-widget-set/src/main/java/com/vaadin/test/addonusingnodefinedwidgetset/AddonUsingNoDefinedWidgetSetUI.java b/test/addon-using-no-defined-widget-set/src/main/java/com/vaadin/test/addonusingnodefinedwidgetset/AddonUsingNoDefinedWidgetSetUI.java index 1893bb46e1..581639a047 100644 --- a/test/addon-using-no-defined-widget-set/src/main/java/com/vaadin/test/addonusingnodefinedwidgetset/AddonUsingNoDefinedWidgetSetUI.java +++ b/test/addon-using-no-defined-widget-set/src/main/java/com/vaadin/test/addonusingnodefinedwidgetset/AddonUsingNoDefinedWidgetSetUI.java @@ -2,8 +2,8 @@ package com.vaadin.test.addonusingnodefinedwidgetset; import javax.servlet.annotation.WebServlet; -import com.vaadin.addon.contextmenu.ContextMenu; import com.vaadin.annotations.VaadinServletConfiguration; +import com.vaadin.contextmenu.ContextMenu; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinServlet; import com.vaadin.test.widgetset.AbstractTestWidgetSetUI; diff --git a/test/addon-using-own-widget-set/pom.xml b/test/addon-using-own-widget-set/pom.xml index fc52e47f4f..de1014b964 100644 --- a/test/addon-using-own-widget-set/pom.xml +++ b/test/addon-using-own-widget-set/pom.xml @@ -14,19 +14,11 @@ <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-test-widget-set-testutil</artifactId> - <version>${project.version}</version> </dependency> <dependency> <groupId>com.vaadin</groupId> - <artifactId>vaadin-test-widget-set-testutil</artifactId> - <version>${project.version}</version> - <type>test-jar</type> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.vaadin.addon</groupId> <artifactId>vaadin-context-menu</artifactId> - <version>0.7.4</version> + <version>${contextmenu.version}</version> </dependency> </dependencies> @@ -36,6 +28,7 @@ <plugin> <groupId>com.vaadin</groupId> <artifactId>vaadin-maven-plugin</artifactId> + <version>${vaadin.plugin.version}</version> <executions> <execution> <goals> @@ -49,4 +42,4 @@ </plugins> </build> -</project>
\ No newline at end of file +</project> diff --git a/test/addon-using-own-widget-set/src/main/java/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSetUI.java b/test/addon-using-own-widget-set/src/main/java/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSetUI.java index 15efad2295..65a62bb8cb 100644 --- a/test/addon-using-own-widget-set/src/main/java/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSetUI.java +++ b/test/addon-using-own-widget-set/src/main/java/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSetUI.java @@ -2,9 +2,9 @@ package com.vaadin.test.addonusingownwidgetset; import javax.servlet.annotation.WebServlet; -import com.vaadin.addon.contextmenu.ContextMenu; import com.vaadin.annotations.VaadinServletConfiguration; import com.vaadin.annotations.Widgetset; +import com.vaadin.contextmenu.ContextMenu; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinServlet; import com.vaadin.test.widgetset.AbstractTestWidgetSetUI; diff --git a/test/addon-using-own-widget-set/src/main/resources/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSet.gwt.xml b/test/addon-using-own-widget-set/src/main/resources/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSet.gwt.xml index 26be42e65b..f4c197b138 100644 --- a/test/addon-using-own-widget-set/src/main/resources/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSet.gwt.xml +++ b/test/addon-using-own-widget-set/src/main/resources/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSet.gwt.xml @@ -3,5 +3,5 @@ <module> <inherits name="com.vaadin.DefaultWidgetSet" /> - <inherits name="com.vaadin.addon.contextmenu.WidgetSet" /> + <inherits name="com.vaadin.contextmenu.WidgetSet" /> </module> diff --git a/test/default-widget-set/pom.xml b/test/default-widget-set/pom.xml index 68ee894911..062f14e0d0 100644 --- a/test/default-widget-set/pom.xml +++ b/test/default-widget-set/pom.xml @@ -14,14 +14,6 @@ <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-test-widget-set-testutil</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>com.vaadin</groupId> - <artifactId>vaadin-test-widget-set-testutil</artifactId> - <version>${project.version}</version> - <type>test-jar</type> - <scope>test</scope> </dependency> <dependency> <groupId>com.vaadin</groupId> @@ -30,5 +22,4 @@ </dependency> </dependencies> - </project>
\ No newline at end of file diff --git a/test/own-widget-set/pom.xml b/test/own-widget-set/pom.xml index 6ce65c868f..e6fd8f2907 100644 --- a/test/own-widget-set/pom.xml +++ b/test/own-widget-set/pom.xml @@ -14,14 +14,6 @@ <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-test-widget-set-testutil</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>com.vaadin</groupId> - <artifactId>vaadin-test-widget-set-testutil</artifactId> - <version>${project.version}</version> - <type>test-jar</type> - <scope>test</scope> </dependency> </dependencies> <build> @@ -29,6 +21,7 @@ <plugin> <groupId>com.vaadin</groupId> <artifactId>vaadin-maven-plugin</artifactId> + <version>${vaadin.plugin.version}</version> <executions> <execution> <goals> @@ -42,4 +35,4 @@ </plugins> </build> -</project>
\ No newline at end of file +</project> diff --git a/test/own-widget-set/src/main/resources/com/vaadin/test/ownwidgetset/OwnWidgetSet.gwt.xml b/test/own-widget-set/src/main/resources/com/vaadin/test/ownwidgetset/OwnWidgetSet.gwt.xml new file mode 100644 index 0000000000..ab3ae019c4 --- /dev/null +++ b/test/own-widget-set/src/main/resources/com/vaadin/test/ownwidgetset/OwnWidgetSet.gwt.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd"> +<module> + <inherits name="com.vaadin.DefaultWidgetSet" /> +</module> diff --git a/test/pom.xml b/test/pom.xml index 622699b64f..587e879802 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -14,7 +14,9 @@ <jetty.version>9.3.7.v20160115</jetty.version> <phantomjs.version>2.1.1</phantomjs.version> <vaadin.version>8.0-SNAPSHOT</vaadin.version> + <vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version> <failOnMissingWebXml>false</failOnMissingWebXml> + <contextmenu.version>2.0-SNAPSHOT</contextmenu.version> <!-- Don't care about coding style for tests --> <sonar.skip>true</sonar.skip> </properties> @@ -35,6 +37,11 @@ <type>pom</type> <scope>import</scope> </dependency> + <dependency> + <groupId>com.vaadin</groupId> + <artifactId>vaadin-test-widget-set-testutil</artifactId> + <version>${project.version}</version> + </dependency> </dependencies> </dependencyManagement> @@ -46,7 +53,7 @@ <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> </dependency> - + <!-- Project modules --> <dependency> <groupId>com.vaadin</groupId> @@ -85,6 +92,50 @@ </modules> <build> + <pluginManagement> + <plugins> + <!--This plugin's configuration is used to store Eclipse + m2e settings only. It has no influence on the Maven build itself. --> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId> + com.github.klieber + </groupId> + <artifactId> + phantomjs-maven-plugin + </artifactId> + <versionRange> + [0.7,) + </versionRange> + <goals> + <goal>install</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore></ignore> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + <plugin> + <artifactId>maven-install-plugin</artifactId> + <version>2.5.1</version> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + </plugins> + </pluginManagement> + <plugins> <plugin> <groupId>org.eclipse.jetty</groupId> @@ -151,50 +202,6 @@ </systemPropertyVariables> </configuration> </plugin> - - <plugin> - <artifactId>maven-install-plugin</artifactId> - <version>2.5.2</version> - <configuration> - <skip>true</skip> - </configuration> - </plugin> </plugins> - <pluginManagement> - <plugins> - <!--This plugin's configuration is used to store Eclipse m2e - settings only. It has no influence on the Maven build itself. --> - <plugin> - <groupId>org.eclipse.m2e</groupId> - <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> - <configuration> - <lifecycleMappingMetadata> - <pluginExecutions> - <pluginExecution> - <pluginExecutionFilter> - <groupId> - com.github.klieber - </groupId> - <artifactId> - phantomjs-maven-plugin - </artifactId> - <versionRange> - [0.7,) - </versionRange> - <goals> - <goal>install</goal> - </goals> - </pluginExecutionFilter> - <action> - <ignore></ignore> - </action> - </pluginExecution> - </pluginExecutions> - </lifecycleMappingMetadata> - </configuration> - </plugin> - </plugins> - </pluginManagement> </build> </project> diff --git a/test/space in directory/pom.xml b/test/space in directory/pom.xml index 65c3574ead..9d3b8dff0c 100644 --- a/test/space in directory/pom.xml +++ b/test/space in directory/pom.xml @@ -13,14 +13,6 @@ <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-test-widget-set-testutil</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>com.vaadin</groupId> - <artifactId>vaadin-test-widget-set-testutil</artifactId> - <version>${project.version}</version> - <type>test-jar</type> - <scope>test</scope> </dependency> </dependencies> <build> @@ -28,6 +20,7 @@ <plugin> <groupId>com.vaadin</groupId> <artifactId>vaadin-maven-plugin</artifactId> + <version>${vaadin.plugin.version}</version> <executions> <execution> <goals> diff --git a/test/vaadinservletconfiguration-widget-set/pom.xml b/test/vaadinservletconfiguration-widget-set/pom.xml index 96a9a94d7f..336f0a1ddc 100644 --- a/test/vaadinservletconfiguration-widget-set/pom.xml +++ b/test/vaadinservletconfiguration-widget-set/pom.xml @@ -14,14 +14,6 @@ <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-test-widget-set-testutil</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>com.vaadin</groupId> - <artifactId>vaadin-test-widget-set-testutil</artifactId> - <version>${project.version}</version> - <type>test-jar</type> - <scope>test</scope> </dependency> </dependencies> <build> @@ -29,6 +21,7 @@ <plugin> <groupId>com.vaadin</groupId> <artifactId>vaadin-maven-plugin</artifactId> + <version>${vaadin.plugin.version}</version> <executions> <execution> <goals> diff --git a/test/widget-set-testutil/pom.xml b/test/widget-set-testutil/pom.xml index 3dcc6db865..0a81446a54 100644 --- a/test/widget-set-testutil/pom.xml +++ b/test/widget-set-testutil/pom.xml @@ -2,31 +2,34 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>com.vaadin</groupId> - <artifactId>vaadin-test</artifactId> - <version>8.0-SNAPSHOT</version> - </parent> + <groupId>com.vaadin</groupId> <artifactId>vaadin-test-widget-set-testutil</artifactId> + <version>8.0-SNAPSHOT</version> <packaging>jar</packaging> + <properties> + <vaadin.version>8.0-SNAPSHOT</vaadin.version> + </properties> + <dependencies> + <dependency> + <groupId>com.vaadin</groupId> + <artifactId>vaadin-server</artifactId> + <version>${vaadin.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.vaadin</groupId> + <artifactId>vaadin-testbench-api</artifactId> + <version>${vaadin.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>provided</scope> + </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>test-jar</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - -</project>
\ No newline at end of file +</project> diff --git a/test/widget-set-testutil/src/test/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java b/test/widget-set-testutil/src/main/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java index c6d4f1756b..c6d4f1756b 100644 --- a/test/widget-set-testutil/src/test/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java +++ b/test/widget-set-testutil/src/main/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java |