</parent>
<artifactId>vaadin-test-bean-api-validation</artifactId>
<packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.vaadin</groupId>
+ <artifactId>vaadin-testbench-api</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
<build>
<plugins>
</plugin>
</plugins>
</build>
-
</project>
import static org.junit.Assert.assertEquals;
+import java.util.function.Function;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.phantomjs.PhantomJSDriver;
import org.openqa.selenium.support.ui.WebDriverWait;
-import com.google.common.base.Predicate;
import com.vaadin.testbench.TestBenchTestCase;
import com.vaadin.testbench.elements.TextFieldElement;
private void runBasicTest(String app1Url, String text) {
getDriver().navigate().to(app1Url);
- Predicate<WebDriver> isTrue = driver -> isElementPresent(
- TextFieldElement.class);
- new WebDriverWait(getDriver(), 5000).until(isTrue);
+ new WebDriverWait(getDriver(), 5000)
+ .until(driver -> isElementPresent(TextFieldElement.class));
getDriver().findElement(By.className("v-textfield")).sendKeys(text);
getDriver().findElement(By.className("v-button")).click();
String foundText = getDriver().findElement(By.className("v-label"))