use of io.blueocean.ath.model.ClassicPipeline in project blueocean-plugin by jenkinsci.
the class FavoritesAddRemoveTest method testClassicPipeline.
@Test
public void testClassicPipeline() throws IOException {
String jobName = "addremove-classic-pipeline";
String script = resources.loadJenkinsFile();
ClassicPipeline pipeline = pipelineFactory.pipeline(FOLDER, jobName).createPipeline(script).build();
String fullName = pipeline.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.ClassicPipeline in project blueocean-plugin by jenkinsci.
the class FavoritesNavigationTest method testClassic.
@Test
public void testClassic() throws IOException {
String jobName = "navigation-classic";
String script = resources.loadJenkinsFile();
ClassicPipeline pipeline = pipelineFactory.pipeline(FOLDER, jobName).createPipeline(script).build();
String fullName = pipeline.getFullName();
// build and wait for completion so that "run details" link works
pipeline.build();
sseClient.untilEvents(SSEEvents.activityComplete(fullName));
addAsFavorite(pipeline);
checkRunDetails(pipeline);
back();
checkActivity(pipeline).toggleFavorite();
back();
dashboardPage.checkFavoriteCardCount(0);
}
use of io.blueocean.ath.model.ClassicPipeline in project blueocean-plugin by jenkinsci.
the class ArtifactsTest method testArtifactsList.
@Test
public void testArtifactsList() throws IOException {
String script = loadResource("artifactsList.groovy");
String pipelineName = this.getClass().getSimpleName() + "_testArtifactListTruncate";
ClassicPipeline pipeline = pipelineFactory.pipeline(pipelineName).createPipeline(script).build();
sseClientRule.untilEvents(SSEEvents.activityComplete(pipelineName));
pipeline.getRunDetailsArtifactsPage().open(1);
wait.until(By.className("btn-show-more"));
click(".btn-show-more");
wait.until(ExpectedConditions.numberOfElementsToBeMoreThan(By.className("JTable-row"), 130));
wait.until(By.cssSelector("a[title='Download all artifact as zip'"));
logger.info("Found artifacts table");
}
use of io.blueocean.ath.model.ClassicPipeline in project blueocean-plugin by jenkinsci.
the class DownstreamLinkTest method downstreamJobLinkAppearsInRunResult.
@Test
public void downstreamJobLinkAppearsInRunResult() throws Exception {
final String upstreamJobScript = "stage ('stageName') { build 'downstreamJob' }";
ClassicPipeline upstreamJob = pipelineFactory.pipeline("upstreamJob").createPipeline(upstreamJobScript);
freestyleJobFactory.pipeline("downstreamJob").create("echo blah");
upstreamJob.build();
sseClient.untilEvents(upstreamJob.buildsFinished);
sseClient.clear();
upstreamJob.getRunDetailsPipelinePage().open(1);
// Heading for table of builds
find("//*[contains(text(),'Triggered Builds')]").isVisible();
// row pointing to downstream build
find("//*[contains(text(),'downstreamJob')]").isVisible();
}
use of io.blueocean.ath.model.ClassicPipeline 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();
}
Aggregations