Search in sources :

Example 1 with TextAxis

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

the class MatrixReloadedPluginTest method rebuild_one_combination.

@Test
public void rebuild_one_combination() {
    MatrixProject job = jenkins.jobs.create(MatrixProject.class);
    job.configure();
    TextAxis x = job.addAxis(TextAxis.class);
    x.name.set("AAA");
    x.valueString.set("111 222");
    TextAxis y = job.addAxis(TextAxis.class);
    y.name.set("BBB");
    y.valueString.set("333 444");
    job.save();
    job.startBuild().waitUntilFinished();
    MatrixReloadedAction action = job.getLastBuild().action(MatrixReloadedAction.class);
    action.open();
    action.shouldHaveCombination("AAA=111,BBB=333").shouldHaveCombination("AAA=111,BBB=444").shouldHaveCombination("AAA=222,BBB=333").shouldHaveCombination("AAA=222,BBB=444");
    action.rebuild("AAA=111,BBB=333");
    MatrixBuild build = (MatrixBuild) job.getLastBuild().shouldSucceed();
    assertThat(build.getConfiguration("AAA=111,BBB=333"), exists());
    assertThat(build.getConfiguration("AAA=111,BBB=444"), not(exists()));
    assertThat(build.getConfiguration("AAA=222,BBB=333"), not(exists()));
    assertThat(build.getConfiguration("AAA=222,BBB=444"), not(exists()));
}
Also used : TextAxis(org.jenkinsci.test.acceptance.po.TextAxis) MatrixReloadedAction(org.jenkinsci.test.acceptance.plugins.matrix_reloaded.MatrixReloadedAction) MatrixProject(org.jenkinsci.test.acceptance.po.MatrixProject) MatrixBuild(org.jenkinsci.test.acceptance.po.MatrixBuild) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test)

Aggregations

AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)1 MatrixReloadedAction (org.jenkinsci.test.acceptance.plugins.matrix_reloaded.MatrixReloadedAction)1 MatrixBuild (org.jenkinsci.test.acceptance.po.MatrixBuild)1 MatrixProject (org.jenkinsci.test.acceptance.po.MatrixProject)1 TextAxis (org.jenkinsci.test.acceptance.po.TextAxis)1 Test (org.junit.Test)1