Search in sources :

Example 1 with UnstableJobsPortlet

use of org.jenkinsci.test.acceptance.plugins.dashboard_view.UnstableJobsPortlet in project acceptance-test-harness by jenkinsci.

the class DashboardViewPluginTest method unstableJobsPortlet_success.

@Test
public void unstableJobsPortlet_success() {
    DashboardView v = createDashboardView();
    UnstableJobsPortlet unstableJobsPortlet = v.addBottomPortlet(UnstableJobsPortlet.class);
    unstableJobsPortlet.setShowOnlyFailedJobs(true);
    v.save();
    FreeStyleJob successfulJob = createFreeStyleJob();
    buildSuccessfulJob(successfulJob);
    assertJobInUnstableJobsPortlet(unstableJobsPortlet, successfulJob.name, false);
}
Also used : UnstableJobsPortlet(org.jenkinsci.test.acceptance.plugins.dashboard_view.UnstableJobsPortlet) DashboardView(org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) Test(org.junit.Test)

Example 2 with UnstableJobsPortlet

use of org.jenkinsci.test.acceptance.plugins.dashboard_view.UnstableJobsPortlet in project acceptance-test-harness by jenkinsci.

the class DashboardViewPluginTest method unstableJobsPortlet_showOnlyFailedJobs.

@Test
public void unstableJobsPortlet_showOnlyFailedJobs() {
    DashboardView v = createDashboardView();
    UnstableJobsPortlet unstableJobsPortlet = v.addBottomPortlet(UnstableJobsPortlet.class);
    unstableJobsPortlet.setShowOnlyFailedJobs(true);
    v.save();
    FreeStyleJob unstableJob = createUnstableFreeStyleJob();
    buildUnstableJob(unstableJob);
    assertJobInUnstableJobsPortlet(unstableJobsPortlet, unstableJob.name, false);
    FreeStyleJob failingJob = createFailingFreeStyleJob();
    buildFailingJob(failingJob);
    assertJobInUnstableJobsPortlet(unstableJobsPortlet, failingJob.name, true);
}
Also used : UnstableJobsPortlet(org.jenkinsci.test.acceptance.plugins.dashboard_view.UnstableJobsPortlet) DashboardView(org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) Test(org.junit.Test)

Example 3 with UnstableJobsPortlet

use of org.jenkinsci.test.acceptance.plugins.dashboard_view.UnstableJobsPortlet in project acceptance-test-harness by jenkinsci.

the class DashboardViewPluginTest method unstableJobsPortlet_notShowOnlyFailedJobs.

@Test
public void unstableJobsPortlet_notShowOnlyFailedJobs() {
    DashboardView v = createDashboardView();
    UnstableJobsPortlet unstableJobsPortlet = v.addBottomPortlet(UnstableJobsPortlet.class);
    unstableJobsPortlet.setShowOnlyFailedJobs(false);
    v.save();
    FreeStyleJob unstableJob = createUnstableFreeStyleJob();
    buildUnstableJob(unstableJob);
    assertJobInUnstableJobsPortlet(unstableJobsPortlet, unstableJob.name, true);
    FreeStyleJob failingJob = createFailingFreeStyleJob();
    buildFailingJob(failingJob);
    assertJobInUnstableJobsPortlet(unstableJobsPortlet, failingJob.name, true);
}
Also used : UnstableJobsPortlet(org.jenkinsci.test.acceptance.plugins.dashboard_view.UnstableJobsPortlet) DashboardView(org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) Test(org.junit.Test)

Aggregations

DashboardView (org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView)3 UnstableJobsPortlet (org.jenkinsci.test.acceptance.plugins.dashboard_view.UnstableJobsPortlet)3 FreeStyleJob (org.jenkinsci.test.acceptance.po.FreeStyleJob)3 Test (org.junit.Test)3