]> source.dussan.org Git - archiva.git/commitdiff
Changing execution flow of JS test for repositories
authorMartin Stockhammer <martin_s@apache.org>
Sun, 11 Jun 2017 19:40:29 +0000 (21:40 +0200)
committerMartin Stockhammer <martin_s@apache.org>
Sun, 11 Jun 2017 19:40:29 +0000 (21:40 +0200)
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java

index 0f52af3b4cf9f9d5a8b8658bc53589187b4fdad5..e168885ed32cccea5c5e741b5f2007225c9c4827 100644 (file)
@@ -90,11 +90,15 @@ public class RepositoryAdminTest
         wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("user-messages"),"ProxyConnector added"));
         wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("proxy-connectors-view"), "central" ));
         wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("proxy-connectors-view"), "myrepoid" ));
-        clickLinkWithXPath( "//i[contains(@class,'icon-resize-vertical')]//ancestor::a");
+
+        tryClick(By.xpath("//i[contains(@class,'icon-resize-vertical')]//ancestor::a" ),
+            ExpectedConditions.visibilityOfAllElementsLocatedBy(By.id("proxy-connector-edit-order-div")),
+            "Edit order view not visible", 3, 10);
+        // clickLinkWithXPath( "//i[contains(@class,'icon-resize-vertical')]//ancestor::a");
         // This is needed here for HTMLUnit Tests. Currently do not know why, wait is not working for the
         // list entries down
-        waitPage();
-        el = wait.until(ExpectedConditions.presenceOfElementLocated(By.id("proxy-connector-edit-order-div")));
+        // waitPage();
+        // el = wait.until(ExpectedConditions.presenceOfElementLocated(By.id("proxy-connector-edit-order-div")));
         assertTextPresent( "internal" );
         List<WebElement> repos = wait.until(ExpectedConditions.numberOfElementsToBe( By.xpath("//div[@id='proxy-connector-edit-order-div']/div"), 2));
         Assert.assertTrue("First repo is myrepo", repos.get(0).getText().contains("myrepoid"));