use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.
the class InjectionDroneTest method testConverterWithError.
@Test
@RunAsClient
public void testConverterWithError() throws MalformedURLException {
driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString());
WebElement convertedValue = driver.findElement(By.id("converter:convertedValue"));
convertedValue.sendKeys("String Value");
WebElement testConveterButton = driver.findElement(By.id("converter:testConveterButton"));
testConveterButton.click();
Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("converter:errorMessage"), "Value is not an Integer").apply(driver));
}
use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.
the class InjectionDroneTest method testValidator.
@Test
@RunAsClient
public void testValidator() throws MalformedURLException {
driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString());
WebElement convertedValue = driver.findElement(By.id("validator:stringValue"));
convertedValue.sendKeys("DeltaSpike");
WebElement testConveterButton = driver.findElement(By.id("validator:testValidatorButton"));
testConveterButton.click();
Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("messages"), "Worked").apply(driver));
}
use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.
the class InjectionDroneTest method testValidatorWithError.
@Test
@RunAsClient
public void testValidatorWithError() throws MalformedURLException {
driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString());
WebElement convertedValue = driver.findElement(By.id("validator:stringValue"));
convertedValue.sendKeys("Wrong Value");
WebElement testConveterButton = driver.findElement(By.id("validator:testValidatorButton"));
testConveterButton.click();
Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("validator:errorMessage"), "The valid value should be DeltaSpike").apply(driver));
}
use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.
the class ViewConfigTestDrone method testNavigationActionMethod2.
@Test
@RunAsClient
public void testNavigationActionMethod2() throws MalformedURLException {
driver.get(new URL(contextPath, "origin.xhtml").toString());
WebElement button = driver.findElement(By.id("destination:pb003ActionMethod2"));
button.click();
Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("homePage"), "You arrived at home page").apply(driver));
}
use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.
the class ViewConfigTestDrone method testNavigationActionMethod2.
@Test
@RunAsClient
public void testNavigationActionMethod2() throws MalformedURLException {
driver.get(new URL(contextPath, "origin.xhtml").toString());
WebElement button = driver.findElement(By.id("destination:pb004ActionMethod2"));
button.click();
Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("overviewPage"), "You arrived at overview page").apply(driver));
}
Aggregations