Search in sources :

Example 1 with WizardCreateAdminUser

use of org.jenkinsci.test.acceptance.po.WizardCreateAdminUser in project acceptance-test-harness by jenkinsci.

the class InstallWizardTest method wizardInstallCustomPluginsTest.

@Since("2.0")
@Test
public void wizardInstallCustomPluginsTest() throws IOException {
    jenkins.open();
    // Login step
    WizardLogin wizardLogin = new WizardLogin(jenkins);
    wizardLogin.doSuccessfulLogin(wizardLogin.getPassword(controller));
    // Customize Jenkins step
    WizardCustomizeJenkins wizardCustomize = new WizardCustomizeJenkins(jenkins);
    wizardCustomize.doSelectPluginsToInstall();
    wizardCustomize.deselectAll();
    wizardCustomize.searchPlugin("pipeline");
    wizardCustomize.selectPlugin("workflow-aggregator");
    wizardCustomize.startInstall();
    wizardCustomize.shouldFinishInstallSuccessfully();
    // Create user test
    WizardCreateAdminUser createAdmin = new WizardCreateAdminUser(jenkins);
    createAdmin.createAdminUser(USERNAME, PASSWORD, FULL_NAME, EMAIL);
    createAdmin.shouldCreateTheUserSuccessfully();
    if (jenkins.getVersion().isNewerThan(new VersionNumber("2.118"))) {
        createAdmin.confirmURLSettings();
    }
    createAdmin.wizardShouldFinishSuccessfully();
    // Check that the new user is logged in
    Login login = new Login(jenkins);
    Assert.assertThat(login, loggedInAs("adminuser"));
}
Also used : WizardCreateAdminUser(org.jenkinsci.test.acceptance.po.WizardCreateAdminUser) WizardLogin(org.jenkinsci.test.acceptance.po.WizardLogin) WizardCustomizeJenkins(org.jenkinsci.test.acceptance.po.WizardCustomizeJenkins) WizardLogin(org.jenkinsci.test.acceptance.po.WizardLogin) Login(org.jenkinsci.test.acceptance.po.Login) VersionNumber(hudson.util.VersionNumber) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test) Since(org.jenkinsci.test.acceptance.junit.Since)

Example 2 with WizardCreateAdminUser

use of org.jenkinsci.test.acceptance.po.WizardCreateAdminUser in project acceptance-test-harness by jenkinsci.

the class InstallWizardTest method wizardInstallSuggestedTest.

@Since("2.0")
@Test
public void wizardInstallSuggestedTest() throws IOException {
    jenkins.open();
    // Login step
    WizardLogin wizardLogin = new WizardLogin(jenkins);
    wizardLogin.doSuccessfulLogin(wizardLogin.getPassword(controller));
    // Customize Jenkins step
    WizardCustomizeJenkins wizardCustomize = new WizardCustomizeJenkins(jenkins);
    wizardCustomize.doInstallSuggested();
    wizardCustomize.shouldFinishInstallSuccessfully();
    // Create user test
    WizardCreateAdminUser createAdmin = new WizardCreateAdminUser(jenkins);
    createAdmin.createAdminUser(USERNAME, PASSWORD, FULL_NAME, EMAIL);
    createAdmin.shouldCreateTheUserSuccessfully();
    if (jenkins.getVersion().isNewerThan(new VersionNumber("2.118"))) {
        createAdmin.confirmURLSettings();
    }
    createAdmin.wizardShouldFinishSuccessfully();
    // Check that the new user is logged in
    Login login = new Login(jenkins);
    Assert.assertThat(login, loggedInAs("adminuser"));
}
Also used : WizardCreateAdminUser(org.jenkinsci.test.acceptance.po.WizardCreateAdminUser) WizardLogin(org.jenkinsci.test.acceptance.po.WizardLogin) WizardCustomizeJenkins(org.jenkinsci.test.acceptance.po.WizardCustomizeJenkins) WizardLogin(org.jenkinsci.test.acceptance.po.WizardLogin) Login(org.jenkinsci.test.acceptance.po.Login) VersionNumber(hudson.util.VersionNumber) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test) Since(org.jenkinsci.test.acceptance.junit.Since)

Aggregations

VersionNumber (hudson.util.VersionNumber)2 AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)2 Since (org.jenkinsci.test.acceptance.junit.Since)2 Login (org.jenkinsci.test.acceptance.po.Login)2 WizardCreateAdminUser (org.jenkinsci.test.acceptance.po.WizardCreateAdminUser)2 WizardCustomizeJenkins (org.jenkinsci.test.acceptance.po.WizardCustomizeJenkins)2 WizardLogin (org.jenkinsci.test.acceptance.po.WizardLogin)2 Test (org.junit.Test)2