]> source.dussan.org Git - archiva.git/commitdiff
Adding additional wait for citest
authorMartin Stockhammer <martin_s@apache.org>
Sat, 10 Jun 2017 18:54:00 +0000 (20:54 +0200)
committerMartin Stockhammer <martin_s@apache.org>
Sat, 10 Jun 2017 18:54:00 +0000 (20:54 +0200)
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java

index 0cdce6536fd7bbba5706e8f1d17aa12b6eda1028..35e26b39bea34ab201634a04340541cb25f0a76f 100644 (file)
@@ -42,6 +42,7 @@ import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.concurrent.TimeUnit;
 
 /**
  * @author Olivier Lamy
@@ -89,6 +90,11 @@ public class WebDriverTest
         // wait until topbar-menu-container is feeded
         //await().atMost(20, TimeUnit.SECONDS).until($("#topbar-menu")).present();
         await().untilPredicate((fl) ->$("#topbar-menu").present());
+        await().atMost( 10, TimeUnit.SECONDS).untilPredicate( ( fl) -> el("#create-admin-link-a").conditions().clickable() ||
+            el("#login-link-a").conditions().clickable()
+        );
+
+
         FluentList<FluentWebElement> elements = find("#create-admin-link-a");
 
         if (!elements.isEmpty() && elements.get(0).displayed()) {