Browse Source

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
tags/8.0.0.beta2
Teemu Suo-Anttila 7 years ago
parent
commit
886a837d6d

+ 2
- 0
.gitignore View File



*/.checkstyle */.checkstyle


# TB default error screenshot folder
error-screenshots/

+ 5
- 0
test/README.md View File

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.

+ 3
- 11
test/addon-using-init-param-widget-set/pom.xml View File

<dependency> <dependency>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
<artifactId>vaadin-test-widget-set-testutil</artifactId> <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>
<!-- Included to ensure AppWidgetset is an option --> <!-- Included to ensure AppWidgetset is an option -->
<dependency> <dependency>
<groupId>com.vaadin.addon</groupId>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-context-menu</artifactId> <artifactId>vaadin-context-menu</artifactId>
<version>0.7.4</version>
<version>${contextmenu.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiled</artifactId> <artifactId>vaadin-client-compiled</artifactId>
<version>${project.version}</version>
</dependency> </dependency>


</dependencies> </dependencies>
<plugin> <plugin>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId> <artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>

+ 1
- 1
test/addon-using-init-param-widget-set/src/main/java/com/vaadin/test/addonusinginitparamwidgetset/AddonUsingInitParamWidgetSetUI.java View File

import javax.servlet.annotation.WebInitParam; import javax.servlet.annotation.WebInitParam;
import javax.servlet.annotation.WebServlet; import javax.servlet.annotation.WebServlet;


import com.vaadin.addon.contextmenu.ContextMenu;
import com.vaadin.annotations.VaadinServletConfiguration; import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.contextmenu.ContextMenu;
import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet; import com.vaadin.server.VaadinServlet;
import com.vaadin.test.widgetset.AbstractTestWidgetSetUI; import com.vaadin.test.widgetset.AbstractTestWidgetSetUI;

+ 1
- 1
test/addon-using-init-param-widget-set/src/test/java/com/vaadin/test/addonusinginitparamwidgetset/AddonUsingInitParamWidgetSetIT.java View File

public void appStartsUserCanInteract() { public void appStartsUserCanInteract() {
testAppStartsUserCanInteract("com.vaadin.DefaultWidgetSet", true); testAppStartsUserCanInteract("com.vaadin.DefaultWidgetSet", true);
assertHasDebugMessage( assertHasDebugMessage(
"does not contain an implementation for com.vaadin.addon.contextmenu.ContextMenu");
"does not contain an implementation for com.vaadin.contextmenu.ContextMenu");
} }


} }

+ 2
- 9
test/addon-using-no-defined-widget-set/pom.xml View File

<dependency> <dependency>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
<artifactId>vaadin-test-widget-set-testutil</artifactId> <artifactId>vaadin-test-widget-set-testutil</artifactId>
<version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.vaadin</groupId> <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> <artifactId>vaadin-context-menu</artifactId>
<version>0.7.4</version>
<version>${contextmenu.version}</version>
</dependency> </dependency>


</dependencies> </dependencies>
<plugin> <plugin>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId> <artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>

+ 1
- 1
test/addon-using-no-defined-widget-set/src/main/java/com/vaadin/test/addonusingnodefinedwidgetset/AddonUsingNoDefinedWidgetSetUI.java View File



import javax.servlet.annotation.WebServlet; import javax.servlet.annotation.WebServlet;


import com.vaadin.addon.contextmenu.ContextMenu;
import com.vaadin.annotations.VaadinServletConfiguration; import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.contextmenu.ContextMenu;
import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet; import com.vaadin.server.VaadinServlet;
import com.vaadin.test.widgetset.AbstractTestWidgetSetUI; import com.vaadin.test.widgetset.AbstractTestWidgetSetUI;

+ 3
- 10
test/addon-using-own-widget-set/pom.xml View File

<dependency> <dependency>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
<artifactId>vaadin-test-widget-set-testutil</artifactId> <artifactId>vaadin-test-widget-set-testutil</artifactId>
<version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.vaadin</groupId> <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> <artifactId>vaadin-context-menu</artifactId>
<version>0.7.4</version>
<version>${contextmenu.version}</version>
</dependency> </dependency>


</dependencies> </dependencies>
<plugin> <plugin>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId> <artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>
</plugins> </plugins>
</build> </build>


</project>
</project>

+ 1
- 1
test/addon-using-own-widget-set/src/main/java/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSetUI.java View File



import javax.servlet.annotation.WebServlet; import javax.servlet.annotation.WebServlet;


import com.vaadin.addon.contextmenu.ContextMenu;
import com.vaadin.annotations.VaadinServletConfiguration; import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.annotations.Widgetset; import com.vaadin.annotations.Widgetset;
import com.vaadin.contextmenu.ContextMenu;
import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet; import com.vaadin.server.VaadinServlet;
import com.vaadin.test.widgetset.AbstractTestWidgetSetUI; import com.vaadin.test.widgetset.AbstractTestWidgetSetUI;

+ 1
- 1
test/addon-using-own-widget-set/src/main/resources/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSet.gwt.xml View File

<module> <module>
<inherits name="com.vaadin.DefaultWidgetSet" /> <inherits name="com.vaadin.DefaultWidgetSet" />


<inherits name="com.vaadin.addon.contextmenu.WidgetSet" />
<inherits name="com.vaadin.contextmenu.WidgetSet" />
</module> </module>

+ 0
- 9
test/default-widget-set/pom.xml View File

<dependency> <dependency>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
<artifactId>vaadin-test-widget-set-testutil</artifactId> <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>
<dependency> <dependency>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
</dependency> </dependency>
</dependencies> </dependencies>



</project> </project>

+ 2
- 9
test/own-widget-set/pom.xml View File

<dependency> <dependency>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
<artifactId>vaadin-test-widget-set-testutil</artifactId> <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>
</dependencies> </dependencies>
<build> <build>
<plugin> <plugin>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId> <artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>
</plugins> </plugins>
</build> </build>


</project>
</project>

+ 5
- 0
test/own-widget-set/src/main/resources/com/vaadin/test/ownwidgetset/OwnWidgetSet.gwt.xml View File

<?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>

+ 52
- 45
test/pom.xml View File

<jetty.version>9.3.7.v20160115</jetty.version> <jetty.version>9.3.7.v20160115</jetty.version>
<phantomjs.version>2.1.1</phantomjs.version> <phantomjs.version>2.1.1</phantomjs.version>
<vaadin.version>8.0-SNAPSHOT</vaadin.version> <vaadin.version>8.0-SNAPSHOT</vaadin.version>
<vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
<failOnMissingWebXml>false</failOnMissingWebXml> <failOnMissingWebXml>false</failOnMissingWebXml>
<contextmenu.version>2.0-SNAPSHOT</contextmenu.version>
<!-- Don't care about coding style for tests --> <!-- Don't care about coding style for tests -->
<sonar.skip>true</sonar.skip> <sonar.skip>true</sonar.skip>
</properties> </properties>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-test-widget-set-testutil</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>


<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version> <version>3.0.1</version>
</dependency> </dependency>
<!-- Project modules --> <!-- Project modules -->
<dependency> <dependency>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
</modules> </modules>


<build> <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> <plugins>
<plugin> <plugin>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
</systemPropertyVariables> </systemPropertyVariables>
</configuration> </configuration>
</plugin> </plugin>

<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins> </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> </build>
</project> </project>

+ 1
- 8
test/space in directory/pom.xml View File

<dependency> <dependency>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
<artifactId>vaadin-test-widget-set-testutil</artifactId> <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>
</dependencies> </dependencies>
<build> <build>
<plugin> <plugin>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId> <artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>

+ 1
- 8
test/vaadinservletconfiguration-widget-set/pom.xml View File

<dependency> <dependency>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
<artifactId>vaadin-test-widget-set-testutil</artifactId> <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>
</dependencies> </dependencies>
<build> <build>
<plugin> <plugin>
<groupId>com.vaadin</groupId> <groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId> <artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>

+ 25
- 22
test/widget-set-testutil/pom.xml View File

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <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> <artifactId>vaadin-test-widget-set-testutil</artifactId>
<version>8.0-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>


<properties>
<vaadin.version>8.0-SNAPSHOT</vaadin.version>
</properties>

<dependencies> <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> </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>
</project>

test/widget-set-testutil/src/test/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java → test/widget-set-testutil/src/main/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java View File


Loading…
Cancel
Save