* Using the default widget set * Using no add-ons but a custom widget set * Using add-ons with a defined widget set * Using add-ons with no defined widget set * Using directories with special characters (space) Change-Id: I85450de359f410003bed94b120915b4736bc2d4ftags/7.7.3
@@ -7,20 +7,20 @@ | |||
<artifactId>vaadin-parent</artifactId> | |||
<version>1.0.0</version> | |||
</parent> | |||
<groupId>com.vaadin</groupId> | |||
<artifactId>vaadin-root</artifactId> | |||
<name>vaadin-root</name> | |||
<packaging>pom</packaging> | |||
<version>7.7-SNAPSHOT</version> | |||
<prerequisites> | |||
<maven>3.0.5</maven> | |||
<maven>3.1.0</maven> | |||
</prerequisites> | |||
<properties> | |||
<maven.compiler.source>1.6</maven.compiler.source> | |||
<maven.compiler.target>1.6</maven.compiler.target> | |||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |||
<!-- Used version numbers for dependencies --> | |||
<commons-io.version>2.4</commons-io.version> | |||
@@ -46,6 +46,9 @@ | |||
<!-- Dependency unpack directory --> | |||
<dependency.unpack.directory>${project.build.directory}/dependency-unpack</dependency.unpack.directory> | |||
<jetty.version>9.3.7.v20160115</jetty.version> | |||
<phantomjs.version>2.1.1</phantomjs.version> | |||
</properties> | |||
<!-- TODO: remove this after maven plugin has been released --> | |||
@@ -74,7 +77,6 @@ | |||
<url>https://github.com/vaadin/vaadin</url> | |||
</scm> | |||
<modules> | |||
<module>buildhelpers</module> | |||
<module>shared</module> | |||
@@ -132,6 +134,15 @@ | |||
<artifactId>maven-surefire-plugin</artifactId> | |||
<version>2.19.1</version> | |||
</plugin> | |||
<plugin> | |||
<artifactId>maven-failsafe-plugin</artifactId> | |||
<version>2.19.1</version> | |||
</plugin> | |||
<plugin> | |||
<groupId>com.github.klieber</groupId> | |||
<artifactId>phantomjs-maven-plugin</artifactId> | |||
<version>0.7</version> | |||
</plugin> | |||
<plugin> | |||
<artifactId>maven-antrun-plugin</artifactId> | |||
<version>1.8</version> | |||
@@ -297,6 +308,12 @@ | |||
</build> | |||
<profiles> | |||
<profile> | |||
<id>slowtest</id> | |||
<modules> | |||
<module>test</module> | |||
</modules> | |||
</profile> | |||
<profile> | |||
<id>release</id> | |||
<activation> |
@@ -0,0 +1,58 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<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>7.7-SNAPSHOT</version> | |||
</parent> | |||
<artifactId>vaadin-test-addon-using-init-param-widget-set</artifactId> | |||
<packaging>war</packaging> | |||
<dependencies> | |||
<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> | |||
<artifactId>vaadin-context-menu</artifactId> | |||
<version>0.7.4</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.vaadin</groupId> | |||
<artifactId>vaadin-client-compiled</artifactId> | |||
<version>${project.version}</version> | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<groupId>com.vaadin</groupId> | |||
<artifactId>vaadin-maven-plugin</artifactId> | |||
<executions> | |||
<execution> | |||
<goals> | |||
<goal>resources</goal> | |||
<goal>update-widgetset</goal> | |||
<goal>compile</goal> | |||
</goals> | |||
</execution> | |||
</executions> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -0,0 +1,25 @@ | |||
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.server.VaadinRequest; | |||
import com.vaadin.server.VaadinServlet; | |||
import com.vaadin.test.widgetset.AbstractTestWidgetSetUI; | |||
import com.vaadin.ui.AbstractComponent; | |||
public class AddonUsingInitParamWidgetSetUI extends AbstractTestWidgetSetUI { | |||
@Override | |||
protected void init(VaadinRequest vaadinRequest) { | |||
super.init(vaadinRequest); | |||
new ContextMenu((AbstractComponent) getContent(), true); | |||
} | |||
@WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true, initParams = @WebInitParam(name = "widgetset", value = "com.vaadin.DefaultWidgetSet")) | |||
@VaadinServletConfiguration(ui = AddonUsingInitParamWidgetSetUI.class, productionMode = false) | |||
public static class MyUIServlet extends VaadinServlet { | |||
} | |||
} |
@@ -0,0 +1,15 @@ | |||
package com.vaadin.test.addonusinginitparamwidgetset; | |||
import org.junit.Test; | |||
import com.vaadin.test.defaultwidgetset.AbstractWidgetSetIT; | |||
public class AddonUsingInitParamWidgetSetIT extends AbstractWidgetSetIT { | |||
@Test | |||
public void appStartsUserCanInteract() { | |||
testAppStartsUserCanInteract("com.vaadin.DefaultWidgetSet"); | |||
assertUnknownComponentShown("com.vaadin.addon.contextmenu.ContextMenu"); | |||
} | |||
} |
@@ -0,0 +1,52 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<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>7.7-SNAPSHOT</version> | |||
</parent> | |||
<artifactId>vaadin-test-addon-using-no-defined-widget-set</artifactId> | |||
<packaging>war</packaging> | |||
<dependencies> | |||
<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> | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<groupId>com.vaadin</groupId> | |||
<artifactId>vaadin-maven-plugin</artifactId> | |||
<executions> | |||
<execution> | |||
<goals> | |||
<goal>resources</goal> | |||
<goal>update-widgetset</goal> | |||
<goal>compile</goal> | |||
</goals> | |||
</execution> | |||
</executions> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -0,0 +1,24 @@ | |||
package com.vaadin.test.addonusingnodefinedwidgetset; | |||
import javax.servlet.annotation.WebServlet; | |||
import com.vaadin.addon.contextmenu.ContextMenu; | |||
import com.vaadin.annotations.VaadinServletConfiguration; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.server.VaadinServlet; | |||
import com.vaadin.test.widgetset.AbstractTestWidgetSetUI; | |||
import com.vaadin.ui.AbstractComponent; | |||
public class AddonUsingNoDefinedWidgetSetUI extends AbstractTestWidgetSetUI { | |||
@Override | |||
protected void init(VaadinRequest vaadinRequest) { | |||
super.init(vaadinRequest); | |||
new ContextMenu((AbstractComponent) getContent(), true); | |||
} | |||
@WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true) | |||
@VaadinServletConfiguration(ui = AddonUsingNoDefinedWidgetSetUI.class, productionMode = false) | |||
public static class MyUIServlet extends VaadinServlet { | |||
} | |||
} |
@@ -0,0 +1,14 @@ | |||
package com.vaadin.test.addonusingnodefinedwidgetset; | |||
import org.junit.Test; | |||
import com.vaadin.test.defaultwidgetset.AbstractWidgetSetIT; | |||
public class AddonUsingNoDefinedWidgetSetIT extends AbstractWidgetSetIT { | |||
@Test | |||
public void appStartsUserCanInteract() { | |||
testAppStartsUserCanInteract("AppWidgetset"); | |||
assertNoUnknownComponentShown(); | |||
} | |||
} |
@@ -0,0 +1,52 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<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>7.7-SNAPSHOT</version> | |||
</parent> | |||
<artifactId>vaadin-test-addon-using-own-widget-set</artifactId> | |||
<packaging>war</packaging> | |||
<dependencies> | |||
<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> | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<groupId>com.vaadin</groupId> | |||
<artifactId>vaadin-maven-plugin</artifactId> | |||
<executions> | |||
<execution> | |||
<goals> | |||
<goal>resources</goal> | |||
<goal>update-widgetset</goal> | |||
<goal>compile</goal> | |||
</goals> | |||
</execution> | |||
</executions> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -0,0 +1,26 @@ | |||
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.server.VaadinRequest; | |||
import com.vaadin.server.VaadinServlet; | |||
import com.vaadin.test.widgetset.AbstractTestWidgetSetUI; | |||
import com.vaadin.ui.AbstractComponent; | |||
@Widgetset("com.vaadin.test.addonusingownwidgetset.AddonUsingOwnWidgetSet") | |||
public class AddonUsingOwnWidgetSetUI extends AbstractTestWidgetSetUI { | |||
@Override | |||
protected void init(VaadinRequest vaadinRequest) { | |||
super.init(vaadinRequest); | |||
new ContextMenu((AbstractComponent) getContent(), true); | |||
} | |||
@WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true) | |||
@VaadinServletConfiguration(ui = AddonUsingOwnWidgetSetUI.class, productionMode = false) | |||
public static class MyUIServlet extends VaadinServlet { | |||
} | |||
} |
@@ -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> |
@@ -0,0 +1,15 @@ | |||
package com.vaadin.test.addonusingownwidgetset; | |||
import org.junit.Test; | |||
import com.vaadin.test.defaultwidgetset.AbstractWidgetSetIT; | |||
public class AddonUsingOwnWidgetSetIT extends AbstractWidgetSetIT { | |||
@Test | |||
public void appStartsUserCanInteract() { | |||
testAppStartsUserCanInteract( | |||
"com.vaadin.test.addonusingownwidgetset.AddonUsingOwnWidgetSet"); | |||
assertNoUnknownComponentShown(); | |||
} | |||
} |
@@ -0,0 +1,34 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<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>7.7-SNAPSHOT</version> | |||
</parent> | |||
<artifactId>vaadin-test-default-widget-set</artifactId> | |||
<packaging>war</packaging> | |||
<dependencies> | |||
<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> | |||
<artifactId>vaadin-client-compiled</artifactId> | |||
<version>${project.version}</version> | |||
</dependency> | |||
</dependencies> | |||
</project> |
@@ -0,0 +1,15 @@ | |||
package com.vaadin.test.defaultwidgetset; | |||
import javax.servlet.annotation.WebServlet; | |||
import com.vaadin.annotations.VaadinServletConfiguration; | |||
import com.vaadin.server.VaadinServlet; | |||
import com.vaadin.test.widgetset.AbstractTestWidgetSetUI; | |||
public class DefaultWidgetSetUI extends AbstractTestWidgetSetUI { | |||
@WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true) | |||
@VaadinServletConfiguration(ui = DefaultWidgetSetUI.class, productionMode = false) | |||
public static class MyUIServlet extends VaadinServlet { | |||
} | |||
} |
@@ -0,0 +1,11 @@ | |||
package com.vaadin.test.defaultwidgetset; | |||
import org.junit.Test; | |||
public abstract class DefaultWidgetSetIT extends AbstractWidgetSetIT { | |||
@Test | |||
public void appStartsUserCanInteract() { | |||
testAppStartsUserCanInteract("com.vaadin.DefaultWidgetSet"); | |||
} | |||
} |
@@ -0,0 +1,45 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<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>7.7-SNAPSHOT</version> | |||
</parent> | |||
<artifactId>vaadin-test-own-widget-set</artifactId> | |||
<packaging>war</packaging> | |||
<dependencies> | |||
<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> | |||
<plugins> | |||
<plugin> | |||
<groupId>com.vaadin</groupId> | |||
<artifactId>vaadin-maven-plugin</artifactId> | |||
<executions> | |||
<execution> | |||
<goals> | |||
<goal>resources</goal> | |||
<goal>update-widgetset</goal> | |||
<goal>compile</goal> | |||
</goals> | |||
</execution> | |||
</executions> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -0,0 +1,17 @@ | |||
package com.vaadin.test.ownwidgetset; | |||
import javax.servlet.annotation.WebServlet; | |||
import com.vaadin.annotations.VaadinServletConfiguration; | |||
import com.vaadin.annotations.Widgetset; | |||
import com.vaadin.server.VaadinServlet; | |||
import com.vaadin.test.widgetset.AbstractTestWidgetSetUI; | |||
@Widgetset("com.vaadin.test.ownwidgetset.OwnWidgetSet") | |||
public class OwnWidgetSetUI extends AbstractTestWidgetSetUI { | |||
@WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true) | |||
@VaadinServletConfiguration(ui = OwnWidgetSetUI.class, productionMode = false) | |||
public static class MyUIServlet extends VaadinServlet { | |||
} | |||
} |
@@ -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> |
@@ -0,0 +1,14 @@ | |||
package com.vaadin.test.ownwidgetset; | |||
import org.junit.Test; | |||
import com.vaadin.test.defaultwidgetset.AbstractWidgetSetIT; | |||
public class OwnWidgetSetIT extends AbstractWidgetSetIT { | |||
@Test | |||
public void appStartsUserCanInteract() { | |||
testAppStartsUserCanInteract( | |||
"com.vaadin.test.ownwidgetset.OwnWidgetSet"); | |||
} | |||
} |
@@ -0,0 +1,147 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<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/xsd/maven-4.0.0.xsd"> | |||
<modelVersion>4.0.0</modelVersion> | |||
<parent> | |||
<groupId>com.vaadin</groupId> | |||
<artifactId>vaadin-root</artifactId> | |||
<version>7.7-SNAPSHOT</version> | |||
</parent> | |||
<artifactId>vaadin-test</artifactId> | |||
<name>vaadin-test</name> | |||
<packaging>pom</packaging> | |||
<properties> | |||
<failOnMissingWebXml>false</failOnMissingWebXml> | |||
</properties> | |||
<repositories> | |||
<repository> | |||
<id>vaadin-addons</id> | |||
<url>http://maven.vaadin.com/vaadin-addons</url> | |||
</repository> | |||
</repositories> | |||
<dependencies> | |||
<!-- API DEPENDENCIES --> | |||
<!-- Project modules --> | |||
<dependency> | |||
<groupId>com.vaadin</groupId> | |||
<artifactId>vaadin-server</artifactId> | |||
<version>${project.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.vaadin</groupId> | |||
<artifactId>vaadin-themes</artifactId> | |||
<version>${project.version}</version> | |||
</dependency> | |||
<!-- Servlet 3.0 API --> | |||
<dependency> | |||
<groupId>javax.servlet</groupId> | |||
<artifactId>javax.servlet-api</artifactId> | |||
<version>3.0.1</version> | |||
<scope>provided</scope> | |||
</dependency> | |||
<!-- Testing --> | |||
<dependency> | |||
<groupId>junit</groupId> | |||
<artifactId>junit</artifactId> | |||
<version>4.11</version> | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.hamcrest</groupId> | |||
<artifactId>hamcrest-all</artifactId> | |||
<version>1.3</version> | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.vaadin</groupId> | |||
<artifactId>vaadin-testbench</artifactId> | |||
<version>4.0.3</version> | |||
<scope>test</scope> | |||
</dependency> | |||
</dependencies> | |||
<modules> | |||
<module>widget-set-testutil</module> | |||
<module>default-widget-set</module> | |||
<module>own-widget-set</module> | |||
<module>addon-using-own-widget-set</module> | |||
<module>addon-using-no-defined-widget-set</module> | |||
<module>addon-using-init-param-widget-set</module> | |||
<module>space in directory</module> | |||
<module>vaadinservletconfiguration-widget-set</module> | |||
</modules> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.eclipse.jetty</groupId> | |||
<artifactId>jetty-maven-plugin</artifactId> | |||
<version>${jetty.version}</version> | |||
<configuration> | |||
<scanIntervalSeconds>-1</scanIntervalSeconds> | |||
<stopPort>8081</stopPort> | |||
<stopWait>5</stopWait> | |||
<stopKey>foo</stopKey> | |||
</configuration> | |||
<executions> | |||
<!-- start and stop jetty (running our app) when running | |||
integration tests --> | |||
<execution> | |||
<id>start-jetty</id> | |||
<phase>pre-integration-test</phase> | |||
<goals> | |||
<goal>start</goal> | |||
</goals> | |||
</execution> | |||
<execution> | |||
<id>stop-jetty</id> | |||
<phase>post-integration-test</phase> | |||
<goals> | |||
<goal>stop</goal> | |||
</goals> | |||
</execution> | |||
</executions> | |||
</plugin> | |||
<plugin> | |||
<groupId>com.github.klieber</groupId> | |||
<artifactId>phantomjs-maven-plugin</artifactId> | |||
<executions> | |||
<execution> | |||
<goals> | |||
<goal>install</goal> | |||
</goals> | |||
<configuration> | |||
<version>${phantomjs.version}</version> | |||
</configuration> | |||
</execution> | |||
</executions> | |||
</plugin> | |||
<plugin> | |||
<artifactId>maven-surefire-plugin</artifactId> | |||
</plugin> | |||
<plugin> | |||
<artifactId>maven-failsafe-plugin</artifactId> | |||
<executions> | |||
<execution> | |||
<goals> | |||
<goal>integration-test</goal> | |||
<goal>verify</goal> | |||
</goals> | |||
</execution> | |||
</executions> | |||
<configuration> | |||
<systemPropertyVariables> | |||
<phantomjs.binary.path>${phantomjs.binary}</phantomjs.binary.path> | |||
</systemPropertyVariables> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -0,0 +1,44 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<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>7.7-SNAPSHOT</version> | |||
</parent> | |||
<artifactId>vaadin-test-space-in-directory</artifactId> | |||
<packaging>war</packaging> | |||
<dependencies> | |||
<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> | |||
<plugins> | |||
<plugin> | |||
<groupId>com.vaadin</groupId> | |||
<artifactId>vaadin-maven-plugin</artifactId> | |||
<executions> | |||
<execution> | |||
<goals> | |||
<goal>resources</goal> | |||
<goal>update-widgetset</goal> | |||
<goal>compile</goal> | |||
</goals> | |||
</execution> | |||
</executions> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -0,0 +1,17 @@ | |||
package com.vaadin.test.spaceindirectory; | |||
import javax.servlet.annotation.WebServlet; | |||
import com.vaadin.annotations.VaadinServletConfiguration; | |||
import com.vaadin.annotations.Widgetset; | |||
import com.vaadin.server.VaadinServlet; | |||
import com.vaadin.test.widgetset.AbstractTestWidgetSetUI; | |||
@Widgetset("com.vaadin.test.spaceindirectory.SpaceInDirectory") | |||
public class SpaceInDirectoryUI extends AbstractTestWidgetSetUI { | |||
@WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true) | |||
@VaadinServletConfiguration(ui = SpaceInDirectoryUI.class, productionMode = false) | |||
public static class MyUIServlet extends VaadinServlet { | |||
} | |||
} |
@@ -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> |
@@ -0,0 +1,15 @@ | |||
package com.vaadin.test.spaceindirectory; | |||
import org.junit.Test; | |||
import com.vaadin.test.defaultwidgetset.AbstractWidgetSetIT; | |||
public class SpaceInDirectoryIT extends AbstractWidgetSetIT { | |||
@Test | |||
public void appStartsUserCanInteract() { | |||
testAppStartsUserCanInteract( | |||
"com.vaadin.test.spaceindirectory.SpaceInDirectory"); | |||
} | |||
} |
@@ -0,0 +1,45 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<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>7.7-SNAPSHOT</version> | |||
</parent> | |||
<artifactId>vaadin-test-vaadinservletconfiguration-widget-set</artifactId> | |||
<packaging>war</packaging> | |||
<dependencies> | |||
<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> | |||
<plugins> | |||
<plugin> | |||
<groupId>com.vaadin</groupId> | |||
<artifactId>vaadin-maven-plugin</artifactId> | |||
<executions> | |||
<execution> | |||
<goals> | |||
<goal>resources</goal> | |||
<goal>update-widgetset</goal> | |||
<goal>compile</goal> | |||
</goals> | |||
</execution> | |||
</executions> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -0,0 +1,16 @@ | |||
package com.vaadin.test.vaadinservletconfigurationwidgetset; | |||
import javax.servlet.annotation.WebServlet; | |||
import com.vaadin.annotations.VaadinServletConfiguration; | |||
import com.vaadin.annotations.Widgetset; | |||
import com.vaadin.server.VaadinServlet; | |||
import com.vaadin.test.widgetset.AbstractTestWidgetSetUI; | |||
public class VaadinServletConfigurationWidgetSetUI extends AbstractTestWidgetSetUI { | |||
@WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true) | |||
@VaadinServletConfiguration(ui = VaadinServletConfigurationWidgetSetUI.class, productionMode = false, widgetset="com.vaadin.test.vaadinservletconfigurationwidgetset.VaadinServletConfigurationWidgetSet") | |||
public static class MyUIServlet extends VaadinServlet { | |||
} | |||
} |
@@ -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> |
@@ -0,0 +1,14 @@ | |||
package com.vaadin.test.vaadinservletconfigurationwidgetset; | |||
import org.junit.Test; | |||
import com.vaadin.test.defaultwidgetset.AbstractWidgetSetIT; | |||
public class VaadinServletConfigurationWidgetSetIT extends AbstractWidgetSetIT { | |||
@Test | |||
public void appStartsUserCanInteract() { | |||
testAppStartsUserCanInteract( | |||
"com.vaadin.test.vaadinservletconfigurationwidgetset.VaadinServletConfigurationWidgetSet"); | |||
} | |||
} |
@@ -0,0 +1,32 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<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>7.7-SNAPSHOT</version> | |||
</parent> | |||
<artifactId>vaadin-test-widget-set-testutil</artifactId> | |||
<packaging>jar</packaging> | |||
<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> |
@@ -0,0 +1,39 @@ | |||
package com.vaadin.test.widgetset; | |||
import com.vaadin.server.VaadinRequest; | |||
import com.vaadin.ui.Button; | |||
import com.vaadin.ui.Button.ClickEvent; | |||
import com.vaadin.ui.Label; | |||
import com.vaadin.ui.TextField; | |||
import com.vaadin.ui.UI; | |||
import com.vaadin.ui.VerticalLayout; | |||
public abstract class AbstractTestWidgetSetUI extends UI { | |||
@Override | |||
protected void init(VaadinRequest vaadinRequest) { | |||
final VerticalLayout layout = new VerticalLayout(); | |||
final Label widgetsetInfo = new Label(); | |||
widgetsetInfo.setId("widgetsetinfo"); | |||
final TextField name = new TextField(); | |||
name.setCaption("Type your name here:"); | |||
Button button = new Button("Click Me"); | |||
button.addClickListener(new Button.ClickListener() { | |||
@Override | |||
public void buttonClick(ClickEvent clickEvent) { | |||
layout.addComponent( | |||
new Label("Thanks " + name.getValue() + ", it works!")); | |||
} | |||
}); | |||
getPage().getJavaScript().execute( | |||
"widgetsetinfo.innerText=document.querySelector('iframe').id;"); | |||
layout.addComponents(widgetsetInfo, name, button); | |||
layout.setMargin(true); | |||
layout.setSpacing(true); | |||
setContent(layout); | |||
} | |||
} |
@@ -0,0 +1,59 @@ | |||
package com.vaadin.test.defaultwidgetset; | |||
import org.junit.Assert; | |||
import org.junit.Before; | |||
import org.junit.Rule; | |||
import org.openqa.selenium.By; | |||
import org.openqa.selenium.WebElement; | |||
import org.openqa.selenium.phantomjs.PhantomJSDriver; | |||
import com.vaadin.testbench.ScreenshotOnFailureRule; | |||
import com.vaadin.testbench.TestBenchTestCase; | |||
import com.vaadin.testbench.elements.ButtonElement; | |||
import com.vaadin.testbench.elements.LabelElement; | |||
import com.vaadin.testbench.elements.TextFieldElement; | |||
public abstract class AbstractWidgetSetIT extends TestBenchTestCase { | |||
@Rule | |||
public ScreenshotOnFailureRule rule = new ScreenshotOnFailureRule(this, | |||
true); | |||
@Before | |||
public void setup() { | |||
// Screenshot rule tears down the driver | |||
setDriver(new PhantomJSDriver()); | |||
} | |||
protected void testAppStartsUserCanInteract(String expectedWidgetSet) { | |||
getDriver().get("http://localhost:8080"); | |||
TextFieldElement nameInput = $(TextFieldElement.class).first(); | |||
nameInput.setValue("John Dåe"); | |||
$(ButtonElement.class).first().click(); | |||
Assert.assertEquals("Label shown", 2, | |||
$(LabelElement.class).all().size()); | |||
Assert.assertEquals("Thanks John Dåe, it works!", | |||
$(LabelElement.class).get(1).getText()); | |||
Assert.assertEquals(expectedWidgetSet, | |||
findElement(By.id("widgetsetinfo")).getText()); | |||
} | |||
protected void assertNoUnknownComponentShown() { | |||
Assert.assertEquals(0, | |||
findElements(By.className("vaadin-unknown-caption")).size()); | |||
} | |||
protected void assertUnknownComponentShown(String componentClass) { | |||
WebElement unknownComponentCaption = findElement( | |||
By.className("vaadin-unknown-caption")); | |||
Assert.assertTrue(unknownComponentCaption.getText().contains( | |||
"does not contain implementation for " + componentClass)); | |||
} | |||
} |
@@ -11,7 +11,6 @@ | |||
<name>vaadin-uitest</name> | |||
<packaging>war</packaging> | |||
<properties> | |||
<jetty.version>9.3.9.v20160517</jetty.version> | |||
<skip.uitest.deployment>true</skip.uitest.deployment> | |||
</properties> | |||