diff options
Diffstat (limited to 'test/addon-using-own-widget-set')
4 files changed, 100 insertions, 0 deletions
diff --git a/test/addon-using-own-widget-set/pom.xml b/test/addon-using-own-widget-set/pom.xml new file mode 100644 index 0000000000..fc52e47f4f --- /dev/null +++ b/test/addon-using-own-widget-set/pom.xml @@ -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>8.0-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>
\ No newline at end of file diff --git a/test/addon-using-own-widget-set/src/main/java/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSetUI.java b/test/addon-using-own-widget-set/src/main/java/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSetUI.java new file mode 100644 index 0000000000..15efad2295 --- /dev/null +++ b/test/addon-using-own-widget-set/src/main/java/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSetUI.java @@ -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 { + } +}
\ No newline at end of file diff --git a/test/addon-using-own-widget-set/src/main/resources/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSet.gwt.xml b/test/addon-using-own-widget-set/src/main/resources/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSet.gwt.xml new file mode 100644 index 0000000000..26be42e65b --- /dev/null +++ b/test/addon-using-own-widget-set/src/main/resources/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSet.gwt.xml @@ -0,0 +1,7 @@ +<?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" /> + + <inherits name="com.vaadin.addon.contextmenu.WidgetSet" /> +</module> diff --git a/test/addon-using-own-widget-set/src/test/java/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSetIT.java b/test/addon-using-own-widget-set/src/test/java/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSetIT.java new file mode 100644 index 0000000000..c22dbf8eb9 --- /dev/null +++ b/test/addon-using-own-widget-set/src/test/java/com/vaadin/test/addonusingownwidgetset/AddonUsingOwnWidgetSetIT.java @@ -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(); + } +}
\ No newline at end of file |