use of org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView 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);
}
use of org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView in project acceptance-test-harness by jenkinsci.
the class DashboardViewPluginTest method latestsBuildsPortlet_correctBuildLink.
@Test
public void latestsBuildsPortlet_correctBuildLink() {
DashboardView v = createDashboardView();
LatestBuildsPortlet latestBuilds = v.addBottomPortlet(LatestBuildsPortlet.class);
v.save();
Build build = buildSuccessfulJob(createFreeStyleJob());
v.open();
latestBuilds.openBuild(build.getNumber());
assertThat(driver, hasContent("Build #" + build.getNumber()));
}
use of org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView 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.DashboardView in project acceptance-test-harness by jenkinsci.
the class DashboardViewPluginTest method testPortletPositioning_leftPortlets.
@Test
public void testPortletPositioning_leftPortlets() {
DashboardView v = createDashboardView();
v.addLeftPortlet(TestStatisticsChartPortlet.class);
v.addRightPortlet(BuildStatisticsPortlet.class);
v.save();
createFreeStyleJob();
assertThat(v.getPortletInTopTable(TestStatisticsChartPortlet.TEST_STATISTICS_CHART), nullValue());
assertThat(v.getPortletInLeftTable(TestStatisticsChartPortlet.TEST_STATISTICS_CHART), notNullValue());
assertThat(v.getPortletInRightTable(TestStatisticsChartPortlet.TEST_STATISTICS_CHART), nullValue());
assertThat(v.getPortletInBottomTable(TestStatisticsChartPortlet.TEST_STATISTICS_CHART), nullValue());
}
use of org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView in project acceptance-test-harness by jenkinsci.
the class DashboardViewPluginTest method testPortletPositioning_rightPortlets.
@Test
public void testPortletPositioning_rightPortlets() {
DashboardView v = createDashboardView();
v.addRightPortlet(TestStatisticsChartPortlet.class);
v.addLeftPortlet(BuildStatisticsPortlet.class);
v.save();
createFreeStyleJob();
assertThat(v.getPortletInTopTable(TestStatisticsChartPortlet.TEST_STATISTICS_CHART), nullValue());
assertThat(v.getPortletInLeftTable(TestStatisticsChartPortlet.TEST_STATISTICS_CHART), nullValue());
assertThat(v.getPortletInRightTable(TestStatisticsChartPortlet.TEST_STATISTICS_CHART), notNullValue());
assertThat(v.getPortletInBottomTable(TestStatisticsChartPortlet.TEST_STATISTICS_CHART), nullValue());
}
Aggregations