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

@@ -62,3 +62,5 @@ phantomjsdriver.log

*/.checkstyle

# TB default error screenshot folder
error-screenshots/

+ 5
- 0
test/README.md View File

@@ -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.

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

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

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

@@ -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;

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

@@ -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");
}

}

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

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

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

@@ -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;

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

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

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

@@ -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;

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

@@ -3,5 +3,5 @@
<module>
<inherits name="com.vaadin.DefaultWidgetSet" />

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

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

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

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

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

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

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

+ 52
- 45
test/pom.xml View File

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

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

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

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

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

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

@@ -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>
</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