]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix issues from TestBench version upgrade (#10360)
authorTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>
Thu, 23 Nov 2017 09:38:13 +0000 (11:38 +0200)
committerGitHub <noreply@github.com>
Thu, 23 Nov 2017 09:38:13 +0000 (11:38 +0200)
test/bean-api-validation/pom.xml
test/bean-api-validation/src/test/java/com/vaadin/data/BeanValidationTest.java
test/servlet-containers/karaf/karaf-run/src/test/java/com/vaadin/test/osgi/KarafIntegrationIT.java

index c384fd10efb67419bb0e724e71c18dd31b0d2255..629861fda284b06ba460e71176a5b7f36903b12a 100644 (file)
@@ -9,6 +9,19 @@
     </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>
@@ -37,5 +50,4 @@
             </plugin>
         </plugins>
     </build>
-
 </project>
index dd7c1586920fb411378971d3351264d5a2b10ca1..ddd42e367f31c43ab22d08d6c09cddc117c6b24a 100644 (file)
@@ -46,7 +46,7 @@ public class BeanValidationTest {
     public void binderWorksWithoutBeanValidationLib() {
         try {
             Class.forName("javax.validation.Validation");
-            fail();
+            fail("Validation API should not be present");
         } catch (ClassNotFoundException ignored) {
         }
 
index 6cede7b3af664b71bfdc7337f2a0471839dcefb0..d9e848eeb592d4ab874c8ac8ac5a006b48fcc266 100644 (file)
@@ -17,6 +17,8 @@ package com.vaadin.test.osgi;
 
 import static org.junit.Assert.assertEquals;
 
+import java.util.function.Function;
+
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -26,7 +28,6 @@ import org.openqa.selenium.WebElement;
 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;
 
@@ -52,9 +53,8 @@ public class KarafIntegrationIT extends TestBenchTestCase {
 
     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"))