From: James Moger Date: Fri, 18 Apr 2014 02:54:17 +0000 (-0400) Subject: [findbugs] Fix Selenium test X-Git-Tag: v1.5.0~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6b254fe9f76c202065153ac045859b8434c81c73;p=gitblit.git [findbugs] Fix Selenium test --- diff --git a/src/test/java/de/akquinet/devops/test/ui/view/RepoEditView.java b/src/test/java/de/akquinet/devops/test/ui/view/RepoEditView.java index a3365d1c..0309bce1 100644 --- a/src/test/java/de/akquinet/devops/test/ui/view/RepoEditView.java +++ b/src/test/java/de/akquinet/devops/test/ui/view/RepoEditView.java @@ -24,9 +24,9 @@ import org.openqa.selenium.support.ui.WebDriverWait; /** * class representing the tabs you can access when you edit a repo. - * + * * @author saheba - * + * */ public class RepoEditView extends GitblitDashboardView { @@ -60,7 +60,6 @@ public class RepoEditView extends GitblitDashboardView { String linkText = "access permissions"; List found = getDriver().findElements( By.partialLinkText(linkText)); - System.out.println("PERM TABS found =" + found.size()); if (found != null && found.size() == 1) { found.get(0).click(); return true; @@ -119,12 +118,11 @@ public class RepoEditView extends GitblitDashboardView { String xpath = "//input[@name =\"authorizationControl\" and @value=\"" + option + "\"]"; List found = getDriver().findElements(By.xpath(xpath)); - System.out.println("found auth CONTROL options " + found.size()); - if (found == null || found.size() == 0 || found.size() > 1) { - return false; + if (found != null && found.size() == 1) { + found.get(0).click(); + return true; } - found.get(0).click(); - return true; + return false; } private boolean isPermissionViewDisabled(String prefix, String view) {