Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
Re-arrange java package for vaadin example.
Browse files Browse the repository at this point in the history
Use PhantomJS to actually test the Vaadin example.
  • Loading branch information
bobmcwhirter committed Dec 2, 2015
1 parent 55d62c6 commit 45218a6
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 10 deletions.
9 changes: 1 addition & 8 deletions pom.xml
Expand Up @@ -163,17 +163,10 @@
<module>servlet</module>
<module>static</module>
<module>transactions</module>
<module>vaadin</module>
<!--
<module>datasource-deployment</module>
<module>datasource-subsystem</module>
<module>docker-jaxrs-app</module>
<module>jsf-shrinkwrap</module>
<module>kitchensink-html5-mobile</module>
<module>msc</module>
<module>servlet</module>
<module>vaadin</module>
<module>simple</module>
-->

<!-- extras -->
Expand Down
15 changes: 15 additions & 0 deletions vaadin/pom.xml
Expand Up @@ -38,11 +38,26 @@
<plugin>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-plugin</artifactId>
<executions>
<execution>
<id>package</id>
</execution>
<execution>
<id>start</id>
</execution>
<execution>
<id>stop</id>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.wildfly.swarm.examples</groupId>
<artifactId>examples-base</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-weld</artifactId>
Expand Down
@@ -0,0 +1,35 @@
package org.wildfly.swarm.it.vaadin;

import org.jboss.arquillian.drone.api.annotation.Drone;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.phantomjs.PhantomJSDriver;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.wildfly.swarm.it.AbstractIntegrationTest;

import static org.fest.assertions.Assertions.assertThat;

/**
* @author Bob McWhirter
*/
@RunWith(Arquillian.class)
public class VaadinApplicationIT extends AbstractIntegrationTest {

@Drone
PhantomJSDriver browser;

@Test
public void testIt() throws Exception {
browser.manage().window().setSize( new Dimension(1024, 768));
browser.navigate().to("http://localhost:8080/");

browser.findElementByClassName( "v-button" ).click();
WebElement notification = browser.findElementByClassName("v-Notification");

assertThat( notification.getText() ).contains( "Howdy at" );
}
}
@@ -1,4 +1,4 @@
package org.wildfly.swarm.examples.cdi;
package org.wildfly.swarm.examples.vaadin;

import java.time.LocalDateTime;

Expand Down
@@ -1,6 +1,7 @@

package org.wildfly.swarm.examples.cdi;
package org.wildfly.swarm.examples.vaadin;

import com.vaadin.annotations.JavaScript;
import com.vaadin.annotations.Theme;
import com.vaadin.cdi.CDIUI;
import com.vaadin.server.VaadinRequest;
Expand Down

0 comments on commit 45218a6

Please sign in to comment.