This repository has been archived by the owner on Jun 7, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-arrange java package for vaadin example.
Use PhantomJS to actually test the Vaadin example.
- Loading branch information
1 parent
55d62c6
commit 45218a6
Showing
5 changed files
with
54 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
vaadin/src/it/java/org/wildfly/swarm/it/vaadin/VaadinApplicationIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" ); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...g/wildfly/swarm/examples/cdi/Greeter.java → ...ildfly/swarm/examples/vaadin/Greeter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
.../wildfly/swarm/examples/cdi/VaadinUI.java → ...ldfly/swarm/examples/vaadin/VaadinUI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters