use of org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView in project acceptance-test-harness by jenkinsci.
the class DashboardViewPluginTest method latestsBuildsPortlet_correctJobLink.
@Test
public void latestsBuildsPortlet_correctJobLink() {
DashboardView v = createDashboardView();
LatestBuildsPortlet latestBuilds = v.addBottomPortlet(LatestBuildsPortlet.class);
v.save();
FreeStyleJob job = createFreeStyleJob();
buildSuccessfulJob(job);
v.open();
latestBuilds.openJob(job.name);
assertThat(driver, hasContent("Project " + job.name));
}
use of org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView in project acceptance-test-harness by jenkinsci.
the class DashboardViewPluginTest method testPortletPositioning_bottomPortlets.
@Test
public void testPortletPositioning_bottomPortlets() {
DashboardView v = createDashboardView();
v.addBottomPortlet(TestStatisticsChartPortlet.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), nullValue());
assertThat(v.getPortletInBottomTable(TestStatisticsChartPortlet.TEST_STATISTICS_CHART), notNullValue());
}
use of org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView in project acceptance-test-harness by jenkinsci.
the class DashboardViewPluginTest method testPortletPositioning_topPortlets.
@Test
public void testPortletPositioning_topPortlets() {
DashboardView v = createDashboardView();
v.addTopPortlet(TestStatisticsChartPortlet.class);
v.save();
createFreeStyleJob();
assertThat(v.getPortletInTopTable(TestStatisticsChartPortlet.TEST_STATISTICS_CHART), notNullValue());
assertThat(v.getPortletInLeftTable(TestStatisticsChartPortlet.TEST_STATISTICS_CHART), nullValue());
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 buildStatisticsPortlet_unstableNr.
@Test
public void buildStatisticsPortlet_unstableNr() {
DashboardView v = createDashboardView();
BuildStatisticsPortlet stats = v.addBottomPortlet(BuildStatisticsPortlet.class);
v.save();
buildUnstableJob(createUnstableFreeStyleJob());
v.open();
assertThat(stats.getNumberOfBuilds(JobType.UNSTABLE), is(1));
}
use of org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView in project acceptance-test-harness by jenkinsci.
the class DashboardViewPluginTest method buildStatisticsPortlet_totalBuilds.
@Test
public void buildStatisticsPortlet_totalBuilds() {
DashboardView v = createDashboardView();
BuildStatisticsPortlet stats = v.addBottomPortlet(BuildStatisticsPortlet.class);
v.save();
FreeStyleJob successJob = createFreeStyleJob();
FreeStyleJob failingJob = createFailingFreeStyleJob();
FreeStyleJob unstableJob = createUnstableFreeStyleJob();
buildUnstableJob(unstableJob);
buildSuccessfulJob(successJob);
buildSuccessfulJob(successJob);
buildFailingJob(failingJob);
v.open();
assertThat(stats.getNumberOfBuilds(JobType.TOTAL), is(4));
}
Aggregations