use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.
the class ViewConfigTestDrone method testNavigationActionMethod.
@Test
@RunAsClient
public void testNavigationActionMethod() throws MalformedURLException {
driver.get(new URL(contextPath, "origin.xhtml").toString());
WebElement button = driver.findElement(By.id("destination:pb004ActionMethod"));
button.click();
Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("indexPage"), "You arrived at index page").apply(driver));
}
use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.
the class ViewConfigTestDrone method testNavigationActionMethod.
@Test
@RunAsClient
public void testNavigationActionMethod() throws MalformedURLException {
driver.get(new URL(contextPath, "origin.xhtml").toString());
WebElement button = driver.findElement(By.id("destination:pb001ActionMethod"));
button.click();
Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("indexPage"), "You arrived at index page").apply(driver));
}
use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.
the class ViewConfigTestDrone method testNavigationActionWithError.
@Test
@RunAsClient
public void testNavigationActionWithError() throws MalformedURLException {
driver.get(new URL(contextPath, "origin.xhtml").toString());
WebElement button = driver.findElement(By.id("destination:pb002ActionWithError"));
button.click();
Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("customErrorPage"), "This is a custom error page").apply(driver));
}
use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.
the class ViewConfigTestDrone method testNavigationActionWithoutError.
@Test
@RunAsClient
public void testNavigationActionWithoutError() throws MalformedURLException {
driver.get(new URL(contextPath, "origin.xhtml").toString());
WebElement button = driver.findElement(By.id("destination:pb002ActionWithoutError"));
button.click();
Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("overviewPage"), "You arrived at overview page").apply(driver));
// Was redirected ?
Assert.assertTrue(driver.getCurrentUrl().contains("overview.xhtml"));
}
use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.
the class NavigationParameterTest method testNavigationActionWithParameter.
@Test
@RunAsClient
public void testNavigationActionWithParameter() throws MalformedURLException {
//first click
driver.get(new URL(contextPath, "origin.xhtml").toString());
WebElement button = driver.findElement(By.id("parameter:pb004ActionMethod"));
button.click();
//second click
driver.get(new URL(contextPath, "origin.xhtml").toString());
button = driver.findElement(By.id("parameter:pb004ActionMethod"));
button.click();
Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("simplePageConfig"), "You arrived at simplePageConfig page").apply(driver));
Assert.assertTrue(driver.getCurrentUrl().contains("cv="));
}
Aggregations