Skip to content

Commit

Permalink
get rid of warp/drone/graphene
Browse files Browse the repository at this point in the history
we dont use any features, not active maintened, no chance to support htmlunit3 with those old versions and we dont even use real features of graphene... we just inject a WebDriver via drone
  • Loading branch information
tandraschko committed Feb 28, 2024
1 parent 645c0ca commit 519e6a2
Show file tree
Hide file tree
Showing 24 changed files with 124 additions and 215 deletions.
27 changes: 3 additions & 24 deletions deltaspike/modules/jsf/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,31 +140,10 @@
<artifactId>tomcat-servlet-api</artifactId>
</dependency>

<!-- we use Arquillian Warp to test our JSF apps -->
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-drone-api</artifactId>
<version>2.5.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-warp-api</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.graphene</groupId>
<artifactId>graphene-webdriver</artifactId>
<version>3.0.0-alpha.3</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>jakarta.enterprise</groupId>
<artifactId>cdi-api</artifactId>
</exclusion>
</exclusions>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>htmlunit3-driver</artifactId>
<version>4.18.1</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,32 @@
*/
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;
import org.junit.experimental.categories.Category;
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;

Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,33 @@
*/
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;
import org.junit.experimental.categories.Category;
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;

Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,33 @@
*/
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;
import org.junit.experimental.categories.Category;
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;

Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;


Expand All @@ -49,9 +47,6 @@
public class ViewConfigTestDrone
{

@Drone
private WebDriver driver;

@ArquillianResource
private URL contextPath;

Expand All @@ -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"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;


Expand All @@ -49,9 +47,6 @@
public class ViewConfigTestDrone
{

@Drone
private WebDriver driver;

@ArquillianResource
private URL contextPath;

Expand All @@ -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"));
Expand All @@ -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"));
Expand All @@ -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"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -39,18 +33,19 @@
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 ViewConfigTestDrone
{

@Drone
private WebDriver driver;

@ArquillianResource
private URL contextPath;

Expand All @@ -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"));
Expand All @@ -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"));
Expand Down
Loading

0 comments on commit 519e6a2

Please sign in to comment.