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());
}
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);
}
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());
}
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());
}
Aggregations