Search in sources :

Example 1 with JobsGridPortlet

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

the class DashboardViewPluginTest method jobsGridPortlet_notFillColumnsFirst.

@Test
public void jobsGridPortlet_notFillColumnsFirst() {
    createFreeStyleJob();
    createFreeStyleJob();
    createFreeStyleJob();
    createFreeStyleJob();
    DashboardView v = createDashboardView();
    JobsGridPortlet jobsGridPortlet = v.addBottomPortlet(JobsGridPortlet.class);
    jobsGridPortlet.setNumberOfColumns(3);
    jobsGridPortlet.setFillColumnFirst(false);
    v.save();
    assertThat(jobsGridPortlet.getJob(1, 3), notNullValue());
    assertThat(jobsGridPortlet.getJob(2, 2), nullValue());
}
Also used : JobsGridPortlet(org.jenkinsci.test.acceptance.plugins.dashboard_view.JobsGridPortlet) DashboardView(org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView) Test(org.junit.Test)

Example 2 with JobsGridPortlet

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

the class DashboardViewPluginTest method jobsGridPortlet_invalidNumberOfColumn.

@Test
public void jobsGridPortlet_invalidNumberOfColumn() {
    // One job is required for the portlet to be displayed
    createFreeStyleJob();
    DashboardView v = createDashboardView();
    JobsGridPortlet jobsGridPortlet = v.addBottomPortlet(JobsGridPortlet.class);
    jobsGridPortlet.setNumberOfColumns(2);
    v.save();
    expectedException.expect(NoSuchElementException.class);
    jobsGridPortlet.getJob(1, 3);
}
Also used : JobsGridPortlet(org.jenkinsci.test.acceptance.plugins.dashboard_view.JobsGridPortlet) DashboardView(org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView) Test(org.junit.Test)

Example 3 with JobsGridPortlet

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

the class DashboardViewPluginTest method jobsGridPortlet_numberOfColumns.

@Test
public void jobsGridPortlet_numberOfColumns() {
    // One job is required for the portlet to be displayed
    createFreeStyleJob();
    DashboardView v = createDashboardView();
    JobsGridPortlet jobsGridPortlet = v.addBottomPortlet(JobsGridPortlet.class);
    jobsGridPortlet.setNumberOfColumns(10);
    v.save();
    assertThat(jobsGridPortlet.getJob(1, 10), nullValue());
}
Also used : JobsGridPortlet(org.jenkinsci.test.acceptance.plugins.dashboard_view.JobsGridPortlet) DashboardView(org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView) Test(org.junit.Test)

Example 4 with JobsGridPortlet

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

the class DashboardViewPluginTest method jobsGridPortlet_fillColumnsFirst.

@Test
public void jobsGridPortlet_fillColumnsFirst() {
    createFreeStyleJob();
    createFreeStyleJob();
    createFreeStyleJob();
    createFreeStyleJob();
    DashboardView v = createDashboardView();
    JobsGridPortlet jobsGridPortlet = v.addBottomPortlet(JobsGridPortlet.class);
    jobsGridPortlet.setNumberOfColumns(3);
    jobsGridPortlet.setFillColumnFirst(true);
    v.save();
    assertThat(jobsGridPortlet.getJob(1, 3), nullValue());
    assertThat(jobsGridPortlet.getJob(2, 2), notNullValue());
}
Also used : JobsGridPortlet(org.jenkinsci.test.acceptance.plugins.dashboard_view.JobsGridPortlet) DashboardView(org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView) Test(org.junit.Test)

Aggregations

DashboardView (org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView)4 JobsGridPortlet (org.jenkinsci.test.acceptance.plugins.dashboard_view.JobsGridPortlet)4 Test (org.junit.Test)4