use of org.jenkinsci.test.acceptance.plugins.dashboard_view.LatestBuildsPortlet 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.LatestBuildsPortlet in project acceptance-test-harness by jenkinsci.
the class DashboardViewPluginTest method latestsBuildsPortlet_onlyLatest.
@Test
public void latestsBuildsPortlet_onlyLatest() {
DashboardView v = createDashboardView();
LatestBuildsPortlet latestBuilds = v.addBottomPortlet(LatestBuildsPortlet.class);
v.save();
FreeStyleJob job = createFreeStyleJob();
for (int i = 0; i <= LatestBuildsPortlet.NUMBER_OF_BUILDS + 1; i++) buildSuccessfulJob(job);
v.open();
assertThat(latestBuilds.hasBuild(1), is(false));
}
use of org.jenkinsci.test.acceptance.plugins.dashboard_view.LatestBuildsPortlet in project acceptance-test-harness by jenkinsci.
the class DashboardViewPluginTest method latestsBuildsPortlet_correctJobAndBuild.
@Test
public void latestsBuildsPortlet_correctJobAndBuild() {
DashboardView v = createDashboardView();
LatestBuildsPortlet latestBuilds = v.addBottomPortlet(LatestBuildsPortlet.class);
v.save();
FreeStyleJob job = createFreeStyleJob();
v.open();
assertThat(latestBuilds.hasJob(job.name), is(false));
Build build1 = buildSuccessfulJob(job);
Build build2 = buildSuccessfulJob(job);
v.open();
assertThat(latestBuilds.hasJob(job.name), is(true));
assertThat(latestBuilds.hasBuild(build1.getNumber()), is(true));
assertThat(latestBuilds.hasBuild(build2.getNumber()), is(true));
}
use of org.jenkinsci.test.acceptance.plugins.dashboard_view.LatestBuildsPortlet 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()));
}
Aggregations