diff --git a/deltaspike/modules/jsf/impl/pom.xml b/deltaspike/modules/jsf/impl/pom.xml index 7c34f3b71..4fd0abc78 100644 --- a/deltaspike/modules/jsf/impl/pom.xml +++ b/deltaspike/modules/jsf/impl/pom.xml @@ -140,31 +140,10 @@ tomcat-servlet-api - - org.jboss.arquillian.extension - arquillian-drone-api - 2.5.4 - test - - - org.jboss.arquillian.extension - arquillian-warp-api - 1.0.0 - test - - - org.jboss.arquillian.graphene - graphene-webdriver - 3.0.0-alpha.3 - pom - test - - - jakarta.enterprise - cdi-api - - + org.seleniumhq.selenium + htmlunit3-driver + 4.18.1 xml-apis diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc001/ViewConfigTestDrone.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc001/ViewConfigTestDrone.java index 0cc97d555..6cffa17e2 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc001/ViewConfigTestDrone.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc001/ViewConfigTestDrone.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.config.view.controller.uc001; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -38,17 +32,18 @@ import org.junit.runner.RunWith; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @RunWith(Arquillian.class) @Category(WebProfileCategory.class) public class ViewConfigTestDrone { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -69,6 +64,7 @@ public static WebArchive deploy() @RunAsClient public void testNavigation() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "simplePageConfig.xhtml").toString()); Assert.assertTrue(ExpectedConditions.textToBePresentInElement( diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc002/ViewConfigTestDrone.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc002/ViewConfigTestDrone.java index 4975ced39..09712b601 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc002/ViewConfigTestDrone.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc002/ViewConfigTestDrone.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.config.view.controller.uc002; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -38,8 +32,12 @@ import org.junit.runner.RunWith; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @@ -47,9 +45,6 @@ @Category(WebProfileCategory.class) public class ViewConfigTestDrone { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -70,6 +65,7 @@ public static WebArchive deploy() @RunAsClient public void testNavigation() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "simplePageConfig.xhtml").toString()); Assert.assertTrue(ExpectedConditions.textToBePresentInElement( diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc003/ViewConfigTestDrone.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc003/ViewConfigTestDrone.java index af2cd664d..321de436e 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc003/ViewConfigTestDrone.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc003/ViewConfigTestDrone.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.config.view.controller.uc003; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -38,8 +32,12 @@ import org.junit.runner.RunWith; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @@ -47,9 +45,6 @@ @Category(WebProfileCategory.class) public class ViewConfigTestDrone { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -70,6 +65,7 @@ public static WebArchive deploy() @RunAsClient public void testNavigation() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "simplePageConfig.xhtml").toString()); Assert.assertTrue(ExpectedConditions.textToBePresentInElement( diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc001/ViewConfigTestDrone.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc001/ViewConfigTestDrone.java index ef740a31f..0a1268955 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc001/ViewConfigTestDrone.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc001/ViewConfigTestDrone.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.config.view.navigation.destination.uc001; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,8 +33,12 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @@ -49,9 +47,6 @@ public class ViewConfigTestDrone { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -75,6 +70,7 @@ public static WebArchive deploy() @RunAsClient public void testNavigationActionMethod() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("destination:pb001ActionMethod")); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc002/ViewConfigTestDrone.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc002/ViewConfigTestDrone.java index 66233c0c2..33abb3855 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc002/ViewConfigTestDrone.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc002/ViewConfigTestDrone.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.config.view.navigation.destination.uc002; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,8 +33,12 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @@ -49,9 +47,6 @@ public class ViewConfigTestDrone { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -76,6 +71,7 @@ public static WebArchive deploy() @RunAsClient public void testNavigationActionWithoutError() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("destination:pb002ActionWithoutError")); @@ -90,6 +86,7 @@ public void testNavigationActionWithoutError() throws MalformedURLException @RunAsClient public void testNavigationActionWithError() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("destination:pb002ActionWithError")); @@ -103,6 +100,7 @@ public void testNavigationActionWithError() throws MalformedURLException @RunAsClient public void testNavigationRestrictedToPages() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("destination:pb002RestrictedToPages")); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc003/ViewConfigTestDrone.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc003/ViewConfigTestDrone.java index 3525f87f5..111ba9fe1 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc003/ViewConfigTestDrone.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc003/ViewConfigTestDrone.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.config.view.navigation.destination.uc003; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,8 +33,12 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @RunWith(Arquillian.class) @@ -48,9 +46,6 @@ public class ViewConfigTestDrone { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -74,6 +69,7 @@ public static WebArchive deploy() @RunAsClient public void testNavigationActionMethod() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("destination:pb003ActionMethod")); @@ -86,6 +82,7 @@ public void testNavigationActionMethod() throws MalformedURLException @RunAsClient public void testNavigationActionMethod2() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("destination:pb003ActionMethod2")); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc004/ViewConfigTestDrone.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc004/ViewConfigTestDrone.java index b4d779fa6..6c0b53486 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc004/ViewConfigTestDrone.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc004/ViewConfigTestDrone.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.config.view.navigation.destination.uc004; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,8 +33,12 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @RunWith(Arquillian.class) @@ -48,9 +46,6 @@ public class ViewConfigTestDrone { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -73,6 +68,7 @@ public static WebArchive deploy() @RunAsClient public void testNavigationActionMethod() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("destination:pb004ActionMethod")); @@ -85,6 +81,7 @@ public void testNavigationActionMethod() throws MalformedURLException @RunAsClient public void testNavigationActionMethod2() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("destination:pb004ActionMethod2")); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc006/ViewConfigTestDrone.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc006/ViewConfigTestDrone.java index ef2e3566a..abaec0dc3 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc006/ViewConfigTestDrone.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc006/ViewConfigTestDrone.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.config.view.navigation.destination.uc006; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,8 +33,12 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @RunWith(Arquillian.class) @@ -48,9 +46,6 @@ public class ViewConfigTestDrone { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -73,6 +68,7 @@ public static WebArchive deploy() @RunAsClient public void testNavigationActionMethod() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("destination:pb006ActionMethod")); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/event/uc001/PreViewConfigNavigateEventTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/event/uc001/PreViewConfigNavigateEventTest.java index cda289930..cf41f54e4 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/event/uc001/PreViewConfigNavigateEventTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/event/uc001/PreViewConfigNavigateEventTest.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.config.view.navigation.event.uc001; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,8 +33,12 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @RunWith(Arquillian.class) @@ -48,9 +46,6 @@ public class PreViewConfigNavigateEventTest { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -77,6 +72,7 @@ public static WebArchive deploy() @RunAsClient public void testNavigationActionWithError() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("event:pb002ActionWithError")); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc003/NavigationParameterTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc003/NavigationParameterTest.java index e75761eb7..38d1c3038 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc003/NavigationParameterTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc003/NavigationParameterTest.java @@ -18,14 +18,10 @@ */ package org.apache.deltaspike.test.jsf.impl.config.view.navigation.parameter.uc003; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; @@ -37,15 +33,17 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + @RunWith(Arquillian.class) @Category(WebProfileCategory.class) public class NavigationParameterTest { - @Drone - private WebDriver driver; @ArquillianResource private URL contextPath; @@ -70,6 +68,7 @@ public static WebArchive deploy() @RunAsClient public void testNavigationActionWithParameter() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("parameter:pb003ActionMethod")); button.click(); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc004/NavigationParameterTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc004/NavigationParameterTest.java index 791f6f1c5..f9938680f 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc004/NavigationParameterTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc004/NavigationParameterTest.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.config.view.navigation.parameter.uc004; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,8 +33,12 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @RunWith(Arquillian.class) @@ -48,9 +46,6 @@ public class NavigationParameterTest { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -74,6 +69,7 @@ public static WebArchive deploy() @RunAsClient public void testNavigationActionWithParameter() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); //first click driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("parameter:pb004ActionMethod")); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc005/NavigationParameterTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc005/NavigationParameterTest.java index 79b8c8423..c28edb962 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc005/NavigationParameterTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc005/NavigationParameterTest.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.config.view.navigation.parameter.uc005; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,8 +33,12 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @RunWith(Arquillian.class) @@ -48,9 +46,6 @@ public class NavigationParameterTest { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -75,6 +70,7 @@ public static WebArchive deploy() @RunAsClient public void testNavigationActionOverview() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("parameter:pb005Overview")); @@ -91,6 +87,7 @@ public void testNavigationActionOverview() throws MalformedURLException @RunAsClient public void testNavigationActionIndex() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("parameter:pb005Index")); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc006/NavigationParameterTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc006/NavigationParameterTest.java index 5d5cbfca1..93b3b8c89 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc006/NavigationParameterTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/parameter/uc006/NavigationParameterTest.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.config.view.navigation.parameter.uc006; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,8 +33,12 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @RunWith(Arquillian.class) @@ -48,9 +46,6 @@ public class NavigationParameterTest { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -74,6 +69,7 @@ public static WebArchive deploy() @RunAsClient public void testNavigationActionWithParameter() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "origin.xhtml").toString()); WebElement button = driver.findElement(By.id("parameter:pb006AnyMethod")); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc001/InjectionDroneTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc001/InjectionDroneTest.java index 02371bb24..865558221 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc001/InjectionDroneTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc001/InjectionDroneTest.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.injection.uc001; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,8 +33,12 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @@ -48,9 +46,6 @@ @Category(WebProfileCategory.class) public class InjectionDroneTest { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -71,6 +66,7 @@ public static WebArchive deploy() @RunAsClient public void testConverter() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString()); WebElement convertedValue = driver.findElement(By.id("converter:convertedValue")); convertedValue.sendKeys("123"); @@ -84,6 +80,7 @@ public void testConverter() throws MalformedURLException @RunAsClient public void testConverterWithError() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString()); WebElement convertedValue = driver.findElement(By.id("converter:convertedValue")); convertedValue.sendKeys("String Value"); @@ -97,6 +94,7 @@ public void testConverterWithError() throws MalformedURLException @RunAsClient public void testValidator() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString()); WebElement convertedValue = driver.findElement(By.id("validator:stringValue")); convertedValue.sendKeys("DeltaSpike"); @@ -110,6 +108,7 @@ public void testValidator() throws MalformedURLException @RunAsClient public void testValidatorWithError() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString()); WebElement convertedValue = driver.findElement(By.id("validator:stringValue")); convertedValue.sendKeys("Wrong Value"); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc002/InjectionDroneTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc002/InjectionDroneTest.java index 3cbdd3aaf..44cdd1c30 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc002/InjectionDroneTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc002/InjectionDroneTest.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.injection.uc002; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,16 +33,18 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @RunWith(Arquillian.class) @Category(WebProfileCategory.class) public class InjectionDroneTest { - @Drone - private WebDriver driver; @ArquillianResource private URL contextPath; @@ -70,6 +66,7 @@ public static WebArchive deploy() @RunAsClient public void testConverter() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString()); WebElement convertedValue = driver.findElement(By.id("converter:convertedValue")); convertedValue.sendKeys("123"); @@ -83,6 +80,7 @@ public void testConverter() throws MalformedURLException @RunAsClient public void testConverterWithError() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString()); WebElement convertedValue = driver.findElement(By.id("converter:convertedValue")); convertedValue.sendKeys("String Value"); @@ -96,6 +94,7 @@ public void testConverterWithError() throws MalformedURLException @RunAsClient public void testValidator() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString()); WebElement convertedValue = driver.findElement(By.id("validator:stringValue")); convertedValue.sendKeys("DeltaSpike"); @@ -109,6 +108,7 @@ public void testValidator() throws MalformedURLException @RunAsClient public void testValidatorWithError() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString()); WebElement convertedValue = driver.findElement(By.id("validator:stringValue")); convertedValue.sendKeys("Wrong Value"); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc003/InjectionDroneTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc003/InjectionDroneTest.java index 9cc3f801b..57708ff4f 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc003/InjectionDroneTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc003/InjectionDroneTest.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.injection.uc003; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,16 +33,18 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @RunWith(Arquillian.class) @Category(WebProfileCategory.class) public class InjectionDroneTest { - @Drone - private WebDriver driver; @ArquillianResource private URL contextPath; @@ -72,6 +68,7 @@ public static WebArchive deploy() @RunAsClient public void testConverter() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString()); WebElement convertedValue = driver.findElement(By.id("converter:convertedValue")); convertedValue.sendKeys("123"); @@ -85,6 +82,7 @@ public void testConverter() throws MalformedURLException @RunAsClient public void testConverterWithError() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString()); WebElement convertedValue = driver.findElement(By.id("converter:convertedValue")); convertedValue.sendKeys("String Value"); @@ -99,6 +97,7 @@ public void testConverterWithError() throws MalformedURLException @RunAsClient public void testValidator() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString()); WebElement convertedValue = driver.findElement(By.id("validator:stringValue")); convertedValue.sendKeys("DeltaSpike"); @@ -112,6 +111,7 @@ public void testValidator() throws MalformedURLException @RunAsClient public void testValidatorWithError() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString()); WebElement convertedValue = driver.findElement(By.id("validator:stringValue")); convertedValue.sendKeys("Wrong Value"); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc004/InjectionDroneTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc004/InjectionDroneTest.java index 920403a31..7c288d02d 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc004/InjectionDroneTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/injection/uc004/InjectionDroneTest.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.injection.uc004; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,16 +33,18 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.MalformedURLException; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @RunWith(Arquillian.class) @Category(WebProfileCategory.class) public class InjectionDroneTest { - @Drone - private WebDriver driver; @ArquillianResource private URL contextPath; @@ -72,6 +68,7 @@ public static WebArchive deploy() @RunAsClient public void testValidator() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString()); WebElement convertedValue = driver.findElement(By.id("validator:stringValue")); convertedValue.sendKeys("DeltaSpike"); @@ -85,6 +82,7 @@ public void testValidator() throws MalformedURLException @RunAsClient public void testValidatorWithError() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString()); WebElement convertedValue = driver.findElement(By.id("validator:stringValue")); convertedValue.sendKeys("Wrong Value"); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/message/JsfMessageTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/message/JsfMessageTest.java index e33ec2b0c..cd87c6997 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/message/JsfMessageTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/message/JsfMessageTest.java @@ -19,20 +19,15 @@ package org.apache.deltaspike.test.jsf.impl.message; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.config.TestJsfModuleConfig; import org.apache.deltaspike.test.jsf.impl.message.beans.JsfMessageBackingBean; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -40,8 +35,11 @@ import org.junit.runner.RunWith; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @@ -52,9 +50,6 @@ @Category(WebProfileCategory.class) public class JsfMessageTest { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -79,6 +74,7 @@ public static WebArchive deploy() @RunAsClient public void testEnglishMessages() throws Exception { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "page.xhtml").toString()); //X comment this in if you like to debug the server @@ -116,6 +112,7 @@ public void testEnglishMessages() throws Exception @RunAsClient public void testGermanMessages() throws Exception { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "page.xhtml?lang=de").toString()); // check the JSF FacesMessages diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/viewaccess/ViewAccessScopedWebAppTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/viewaccess/ViewAccessScopedWebAppTest.java index 52ad2d55b..b761f5577 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/viewaccess/ViewAccessScopedWebAppTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/viewaccess/ViewAccessScopedWebAppTest.java @@ -18,20 +18,15 @@ */ package org.apache.deltaspike.test.jsf.impl.scope.viewaccess; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.scope.viewaccess.beans.ViewAccessScopedBeanX; import org.apache.deltaspike.test.jsf.impl.scope.viewaccess.beans.ViewAccessScopedBeanY; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -40,17 +35,17 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @RunWith(Arquillian.class) @Category(WebProfileCategory.class) public class ViewAccessScopedWebAppTest { - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -76,6 +71,7 @@ public static WebArchive deploy() @RunAsClient public void testForward() throws Exception { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "page1.xhtml").toString()); WebElement inputFieldX = driver.findElement(By.id("testForm1:valueInputX")); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/viewaccess/ViewAccessScopedWithFViewActionWebAppTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/viewaccess/ViewAccessScopedWithFViewActionWebAppTest.java index 2630be7bb..524d8eb1c 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/viewaccess/ViewAccessScopedWithFViewActionWebAppTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/viewaccess/ViewAccessScopedWithFViewActionWebAppTest.java @@ -18,20 +18,15 @@ */ package org.apache.deltaspike.test.jsf.impl.scope.viewaccess; -import java.net.URL; - import org.apache.deltaspike.test.category.WebEEProfileCategory; import org.apache.deltaspike.test.jsf.impl.scope.viewaccess.beans.ViewAccessScopedBeanX; import org.apache.deltaspike.test.jsf.impl.scope.viewaccess.beans.ViewAccessScopedBeanY; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -40,16 +35,17 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; +import java.net.URL; + import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @RunWith(Arquillian.class) @Category(WebEEProfileCategory.class) public class ViewAccessScopedWithFViewActionWebAppTest { - @Drone - private WebDriver driver; @ArquillianResource private URL contextPath; @@ -76,6 +72,7 @@ public static WebArchive deploy() @RunAsClient public void testForward() throws Exception { + WebDriver driver = new HtmlUnitDriver(true); driver.get(new URL(contextPath, "index.xhtml").toString()); WebElement inputFieldX = driver.findElement(By.id("form:firstValue")); diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/window/WindowMaxCountTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/window/WindowMaxCountTest.java index ba704fd6e..b4fdea1f0 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/window/WindowMaxCountTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/window/WindowMaxCountTest.java @@ -18,19 +18,13 @@ */ package org.apache.deltaspike.test.jsf.impl.scope.window; -import java.net.MalformedURLException; -import java.net.URL; - import org.apache.deltaspike.test.category.WebProfileCategory; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,6 +33,10 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; + +import java.net.MalformedURLException; +import java.net.URL; import static org.apache.deltaspike.test.utils.BeansXmlUtil.BEANS_XML_ALL; @@ -50,9 +48,6 @@ public class WindowMaxCountTest @ArquillianResource private URL contextPath; - @Drone - private WebDriver driver; - @Deployment public static WebArchive deploy() { @@ -73,6 +68,7 @@ public static WebArchive deploy() @RunAsClient public void maxWindowPerSessionTest() throws MalformedURLException { + WebDriver driver = new HtmlUnitDriver(true); // PAGE 1 - REQUEST 1 driver.get(new URL(contextPath, "windowcount.xhtml").toString()); // click once diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/window/WindowScopedContextFrameTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/window/WindowScopedContextFrameTest.java index 0cebe6014..9f5f74c95 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/window/WindowScopedContextFrameTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/window/WindowScopedContextFrameTest.java @@ -23,14 +23,11 @@ import org.apache.deltaspike.test.jsf.impl.config.TestJsfModuleConfig; import org.apache.deltaspike.test.jsf.impl.scope.window.beans.WindowScopedBackingBean; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -55,9 +52,6 @@ public class WindowScopedContextFrameTest { private static final Logger log = Logger.getLogger(WindowScopedContextFrameTest.class.getName()); - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -83,6 +77,7 @@ public static WebArchive deploy() @RunAsClient public void testWindowId() throws Exception { + WebDriver driver = new HtmlUnitDriver(true); System.out.println("contextpath= " + contextPath); //X comment this in if you like to debug the server diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/window/WindowScopedContextTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/window/WindowScopedContextTest.java index 4659947b6..ad95fb391 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/window/WindowScopedContextTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/window/WindowScopedContextTest.java @@ -23,14 +23,11 @@ import org.apache.deltaspike.test.jsf.impl.config.TestJsfModuleConfig; import org.apache.deltaspike.test.jsf.impl.scope.window.beans.WindowScopedBackingBean; import org.apache.deltaspike.test.jsf.impl.util.ArchiveUtils; -import org.apache.deltaspike.test.utils.BeansXmlUtil; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.junit.Test; @@ -39,6 +36,7 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import java.net.URL; @@ -56,9 +54,6 @@ public class WindowScopedContextTest { private static final Logger log = Logger.getLogger(WindowScopedContextTest.class.getName()); - @Drone - private WebDriver driver; - @ArquillianResource private URL contextPath; @@ -84,6 +79,7 @@ public static WebArchive deploy() @RunAsClient public void testWindowId() throws Exception { + WebDriver driver = new HtmlUnitDriver(true); System.out.println("contextpath= " + contextPath); //X comment this in if you like to debug the server