use of org.jenkinsci.test.acceptance.plugins.dashboard_view.BuildStatisticsPortlet in project acceptance-test-harness by jenkinsci.
the class DashboardViewPluginTest method buildStatisticsPortlet_failedNr.
@Test
public void buildStatisticsPortlet_failedNr() {
DashboardView v = createDashboardView();
BuildStatisticsPortlet stats = v.addBottomPortlet(BuildStatisticsPortlet.class);
v.save();
buildFailingJob(createFailingFreeStyleJob());
v.open();
assertThat(stats.getNumberOfBuilds(JobType.FAILED), is(1));
}
use of org.jenkinsci.test.acceptance.plugins.dashboard_view.BuildStatisticsPortlet in project acceptance-test-harness by jenkinsci.
the class DashboardViewPluginTest method configureDashboardFilterOnlyDisabledJobs.
@Test
@Ignore("The statistics portlet shows only one job in total (the disabled one). it is shown as successful (1) but disabled(0)." + "I found no way to get a disabled number other than zero when status filter is set to disabled. ")
public void configureDashboardFilterOnlyDisabledJobs() {
DashboardView v = createDashboardView();
BuildStatisticsPortlet stats = v.addBottomPortlet(BuildStatisticsPortlet.class);
v.configure(() -> {
v.jobFilters.setStatusFilter(JobFiltersArea.StatusFilter.DISABLED);
});
final FreeStyleJob active = createFreeStyleJob();
final FreeStyleJob disabled = createFreeStyleJob();
buildSuccessfulJob(active);
buildSuccessfulJob(disabled);
disabled.configure(disabled::disable);
v.open();
assertThat(stats.getNumberOfBuilds(JobType.TOTAL), is(1));
// When run the number of disabled jobs is zero.
assertThat(stats.getNumberOfBuilds(JobType.DISABLED), is(1));
}
Aggregations