use of io.blueocean.ath.model.FreestyleJob in project blueocean-plugin by jenkinsci.
the class FavoritesAddRemoveTest method testFreestyle.
@Test
public void testFreestyle() throws IOException {
String jobName = "addremove-freestyle";
FreestyleJob freestyle = freestyleFactory.pipeline(FOLDER, jobName).create("echo hi");
String fullName = freestyle.getFullName();
dashboardPage.open();
dashboardPage.togglePipelineListFavorite(jobName);
dashboardPage.checkFavoriteCardCount(1);
dashboardPage.togglePipelineListFavorite(jobName);
dashboardPage.checkFavoriteCardCount(0);
Assert.assertTrue("should not be favorited", !dashboardPage.isPipelineListItemFavorited(jobName));
}
use of io.blueocean.ath.model.FreestyleJob in project blueocean-plugin by jenkinsci.
the class FavoritesCardsTest method testFreestyle.
@Test
public void testFreestyle() throws IOException {
String jobName = "favoritescards-freestyle";
FreestyleJob freestyle = freestyleFactory.pipeline(FOLDER, jobName).create("echo hello\nsleep 5\necho world");
String fullName = freestyle.getFullName();
dashboardPage.open();
dashboardPage.togglePipelineListFavorite(jobName);
dashboardPage.checkFavoriteCardCount(1);
dashboardPage.clickFavoriteCardRunButton(fullName);
dashboardPage.checkFavoriteCardStatus(fullName, RUNNING, SUCCESS);
dashboardPage.removeFavoriteCard(fullName);
dashboardPage.checkFavoriteCardCount(0);
dashboardPage.checkIsPipelineListItemFavorited(jobName, false);
}
use of io.blueocean.ath.model.FreestyleJob in project blueocean-plugin by jenkinsci.
the class ArtifactsTest method testNoArtifacts.
@Test
public void testNoArtifacts() throws IOException {
FreestyleJob testNoArtifacts = freestyleJobFactory.pipeline("testNoArtifacts").create("echo hi").build();
sseClientRule.untilEvents(SSEEvents.activityComplete("testNoArtifacts"));
testNoArtifacts.getRunDetailsArtifactsPage().open(1);
wait.until(ExpectedConditions.invisibilityOfElementLocated(By.cssSelector("a[title='Download all artifact as zip'")));
}
use of io.blueocean.ath.model.FreestyleJob in project blueocean-plugin by jenkinsci.
the class UpstreamLinkTest method upstreamLinkTest.
@Test
public void upstreamLinkTest() throws IOException {
String jenkinsFile = loadJenkinsFile();
FreestyleJob upstreamJob = freestyleJobFactory.pipeline("upstreamJob").create("echo blah");
ClassicPipeline downstreamJob = pipelineFactory.pipeline("downstreamJob").createPipeline(jenkinsFile).build();
sseClient.untilEvents(downstreamJob.buildsFinished);
sseClient.clear();
upstreamJob.build();
sseClient.untilEvents(upstreamJob.buildsFinished);
sseClient.untilEvents(downstreamJob.buildsFinished);
sseClient.clear();
ActivityPage activityPage = downstreamJob.getActivityPage().open();
find("//*[contains(text(),'Started by upstream pipeline')]").isVisible();
downstreamJob.getRunDetailsPipelinePage().open(2);
find("//*[contains(text(),'Started by upstream pipeline')]").isVisible();
}
use of io.blueocean.ath.model.FreestyleJob in project blueocean-plugin by jenkinsci.
the class FavoritesNavigationTest method testFreestyle.
@Test
public void testFreestyle() throws IOException {
String jobName = "navigation-freestyle";
FreestyleJob freestyle = freestyleFactory.pipeline(FOLDER, jobName).create("echo hi");
String fullName = freestyle.getFullName();
// build and wait for completion so that "run details" link works
freestyle.build();
sseClient.untilEvents(SSEEvents.activityComplete(fullName));
addAsFavorite(freestyle);
checkRunDetails(freestyle);
back();
checkActivity(freestyle).toggleFavorite();
back();
dashboardPage.checkFavoriteCardCount(0);
}
Aggregations