Search in sources :

Example 26 with DashboardView

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);
}
Also used : UnstableJobsPortlet(org.jenkinsci.test.acceptance.plugins.dashboard_view.UnstableJobsPortlet) DashboardView(org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) Test(org.junit.Test)

Example 27 with DashboardView

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()));
}
Also used : LatestBuildsPortlet(org.jenkinsci.test.acceptance.plugins.dashboard_view.LatestBuildsPortlet) Build(org.jenkinsci.test.acceptance.po.Build) DashboardView(org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView) Test(org.junit.Test)

Example 28 with DashboardView

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());
}
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 29 with DashboardView

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());
}
Also used : DashboardView(org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView) Test(org.junit.Test)

Example 30 with DashboardView

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());
}
Also used : DashboardView(org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView) Test(org.junit.Test)

Aggregations

DashboardView (org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView)35 Test (org.junit.Test)32 FreeStyleJob (org.jenkinsci.test.acceptance.po.FreeStyleJob)16 BuildStatisticsPortlet (org.jenkinsci.test.acceptance.plugins.dashboard_view.BuildStatisticsPortlet)7 JobsGridPortlet (org.jenkinsci.test.acceptance.plugins.dashboard_view.JobsGridPortlet)4 LatestBuildsPortlet (org.jenkinsci.test.acceptance.plugins.dashboard_view.LatestBuildsPortlet)4 WithPlugins (org.jenkinsci.test.acceptance.junit.WithPlugins)3 TestStatisticsChartPortlet (org.jenkinsci.test.acceptance.plugins.dashboard_view.TestStatisticsChartPortlet)3 UnstableJobsPortlet (org.jenkinsci.test.acceptance.plugins.dashboard_view.UnstableJobsPortlet)3 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)2 NestedView (org.jenkinsci.test.acceptance.plugins.nested_view.NestedView)2 Build (org.jenkinsci.test.acceptance.po.Build)2 Folder (org.jenkinsci.test.acceptance.po.Folder)2 Issue (org.jvnet.hudson.test.Issue)2 Description (org.hamcrest.Description)1 Matcher (org.jenkinsci.test.acceptance.Matcher)1 AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)1 WithCredentials (org.jenkinsci.test.acceptance.junit.WithCredentials)1 WithDocker (org.jenkinsci.test.acceptance.junit.WithDocker)1 AnalysisPlugin (org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisPlugin)1