* 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
<artifactId>vaadin-parent</artifactId> | <artifactId>vaadin-parent</artifactId> | ||||
<version>1.0.0</version> | <version>1.0.0</version> | ||||
</parent> | </parent> | ||||
<groupId>com.vaadin</groupId> | |||||
<artifactId>vaadin-root</artifactId> | <artifactId>vaadin-root</artifactId> | ||||
<name>vaadin-root</name> | <name>vaadin-root</name> | ||||
<packaging>pom</packaging> | <packaging>pom</packaging> | ||||
<version>7.7-SNAPSHOT</version> | <version>7.7-SNAPSHOT</version> | ||||
<prerequisites> | <prerequisites> | ||||
<maven>3.0.5</maven> | |||||
<maven>3.1.0</maven> | |||||
</prerequisites> | </prerequisites> | ||||
<properties> | <properties> | ||||
<maven.compiler.source>1.6</maven.compiler.source> | <maven.compiler.source>1.6</maven.compiler.source> | ||||
<maven.compiler.target>1.6</maven.compiler.target> | <maven.compiler.target>1.6</maven.compiler.target> | ||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |||||
<!-- Used version numbers for dependencies --> | <!-- Used version numbers for dependencies --> | ||||
<commons-io.version>2.4</commons-io.version> | <commons-io.version>2.4</commons-io.version> | ||||
<!-- Dependency unpack directory --> | <!-- Dependency unpack directory --> | ||||
<dependency.unpack.directory>${project.build.directory}/dependency-unpack</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> | </properties> | ||||
<!-- TODO: remove this after maven plugin has been released --> | <!-- TODO: remove this after maven plugin has been released --> | ||||
<url>https://github.com/vaadin/vaadin</url> | <url>https://github.com/vaadin/vaadin</url> | ||||
</scm> | </scm> | ||||
<modules> | <modules> | ||||
<module>buildhelpers</module> | <module>buildhelpers</module> | ||||
<module>shared</module> | <module>shared</module> | ||||
<artifactId>maven-surefire-plugin</artifactId> | <artifactId>maven-surefire-plugin</artifactId> | ||||
<version>2.19.1</version> | <version>2.19.1</version> | ||||
</plugin> | </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> | <plugin> | ||||
<artifactId>maven-antrun-plugin</artifactId> | <artifactId>maven-antrun-plugin</artifactId> | ||||
<version>1.8</version> | <version>1.8</version> | ||||
</build> | </build> | ||||
<profiles> | <profiles> | ||||
<profile> | |||||
<id>slowtest</id> | |||||
<modules> | |||||
<module>test</module> | |||||
</modules> | |||||
</profile> | |||||
<profile> | <profile> | ||||
<id>release</id> | <id>release</id> | ||||
<activation> | <activation> |
<?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> |
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 { | |||||
} | |||||
} |
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"); | |||||
} | |||||
} |
<?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> |
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 { | |||||
} | |||||
} |
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(); | |||||
} | |||||
} |
<?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> |
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 { | |||||
} | |||||
} |
<?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> |
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(); | |||||
} | |||||
} |
<?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> |
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 { | |||||
} | |||||
} |
package com.vaadin.test.defaultwidgetset; | |||||
import org.junit.Test; | |||||
public abstract class DefaultWidgetSetIT extends AbstractWidgetSetIT { | |||||
@Test | |||||
public void appStartsUserCanInteract() { | |||||
testAppStartsUserCanInteract("com.vaadin.DefaultWidgetSet"); | |||||
} | |||||
} |
<?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> |
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 { | |||||
} | |||||
} |
<?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> |
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"); | |||||
} | |||||
} |
<?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> |
<?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> |
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 { | |||||
} | |||||
} |
<?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> |
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"); | |||||
} | |||||
} |
<?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> |
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 { | |||||
} | |||||
} |
<?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> |
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"); | |||||
} | |||||
} |
<?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> |
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); | |||||
} | |||||
} |
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)); | |||||
} | |||||
} |
<name>vaadin-uitest</name> | <name>vaadin-uitest</name> | ||||
<packaging>war</packaging> | <packaging>war</packaging> | ||||
<properties> | <properties> | ||||
<jetty.version>9.3.9.v20160517</jetty.version> | |||||
<skip.uitest.deployment>true</skip.uitest.deployment> | <skip.uitest.deployment>true</skip.uitest.deployment> | ||||
</properties> | </properties> | ||||