Search in sources :

Example 1 with ConfigurablePageObject

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");
        }
    });
}
Also used : Control(org.jenkinsci.test.acceptance.po.Control) ConfigurablePageObject(org.jenkinsci.test.acceptance.po.ConfigurablePageObject) ToolInstallationPageObject(org.jenkinsci.test.acceptance.po.ToolInstallationPageObject)

Aggregations

ConfigurablePageObject (org.jenkinsci.test.acceptance.po.ConfigurablePageObject)1 Control (org.jenkinsci.test.acceptance.po.Control)1 ToolInstallationPageObject (org.jenkinsci.test.acceptance.po.ToolInstallationPageObject)1