use of org.jenkinsci.test.acceptance.po.ConfigurablePageObject in project acceptance-test-harness by jenkinsci.
the class JGitInstallation method addJGit.
public static JGitInstallation addJGit(Jenkins jenkins) {
ConfigurablePageObject toolsPage = ToolInstallation.ensureConfigPage(jenkins);
final String name = JGitInstallation.class.getAnnotation(ToolInstallationPageObject.class).name();
final Control button = toolsPage.control(by.button("Add " + name));
String pathPrefix = button.resolve().getAttribute("path").replaceAll(Pattern.quote("hetero-list-add[tool]"), "tool");
return ToolInstallation.addTool(jenkins, JGitInstallation.class, pathPrefix, new Runnable() {
@Override
public void run() {
button.selectDropdownMenu("JGit");
}
});
}
Aggregations