diff options
author | James Moger <james.moger@gitblit.com> | 2014-04-17 22:54:17 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-04-17 23:08:07 -0400 |
commit | 6b254fe9f76c202065153ac045859b8434c81c73 (patch) | |
tree | b7aced79415fa123f8194d9cbd7856a857693f8a | |
parent | 68fb1791fa8033d464d50e45481d04c3e3d0a025 (diff) | |
download | gitblit-6b254fe9f76c202065153ac045859b8434c81c73.tar.gz gitblit-6b254fe9f76c202065153ac045859b8434c81c73.zip |
[findbugs] Fix Selenium test
-rw-r--r-- | src/test/java/de/akquinet/devops/test/ui/view/RepoEditView.java | 14 |
1 files changed, 6 insertions, 8 deletions
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<WebElement> 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<WebElement> 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) { |