Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions XTS/raw-xts-api-demo/test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-drone-bom</artifactId>
<version>2.5.6</version>
<version>3.0.0.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -45,19 +45,14 @@
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit5</groupId>
<artifactId>arquillian-junit5-container</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package org.jboss.jbossts.xts.demotest;

import java.net.URL;
import java.time.Duration;
import java.util.zip.ZipFile;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.drone.api.annotation.Drone;
import org.jboss.arquillian.junit5.ArquillianExtension;
Expand All @@ -9,18 +13,11 @@
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.junit.Assert;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.runner.RunWith;

import org.openqa.selenium.By;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;

import java.util.concurrent.TimeUnit;

import java.net.URL;
import java.util.zip.ZipFile;
import org.jboss.arquillian.drone.webdriver.htmlunit.DroneHtmlUnitDriver;

/**
* Basic tests for XTS demo application.
Expand All @@ -44,7 +41,7 @@ public class XTSDemoTest {


@Drone
private HtmlUnitDriver driver;
private DroneHtmlUnitDriver driver;

// Load context path to the test
@ArquillianResource
Expand Down Expand Up @@ -85,7 +82,7 @@ protected void testReservation(String txType, String restaurantSeats, String the
log.info("contextPath = " + contextPath);
driver.get(contextPath + "/" + DEMO_APP_CONTEXT + "/");

driver.manage().timeouts().implicitlyWait(IMPLICIT_WAIT_S, TimeUnit.SECONDS);
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(IMPLICIT_WAIT_S));
driver.findElement(TX_TYPE_FIELD);
log.info("driver.getTitle() = " + driver.getTitle());

Expand All @@ -101,11 +98,11 @@ protected void testReservation(String txType, String restaurantSeats, String the

String resultTableTitle = driver.findElement(RESULT_TABLE_TITLE_XP).getText();
log.info("resultTableTitle = " + resultTableTitle);
Assert.assertTrue("Page does not contain any results!", resultTableTitle.contains(RESULT_TITLE));
Assertions.assertTrue(resultTableTitle.contains(RESULT_TITLE), "Page does not contain any results!");

String resultTableContent = driver.findElement(RESULT_TABLE_CONTENT_XP).getText();
log.info("resultTableContent = " + resultTableContent);
Assert.assertTrue("Transaction failed with: " + resultTableContent, resultTableContent.contains(TRANSACTION_FINISHED));
Assertions.assertTrue(resultTableContent.contains(TRANSACTION_FINISHED), "Transaction failed with: " + resultTableContent);
}

}