Search in sources :

Example 1 with ClassicPipeline

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));
}
Also used : ClassicPipeline(io.blueocean.ath.model.ClassicPipeline) Test(org.junit.Test)

Example 2 with ClassicPipeline

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);
}
Also used : ClassicPipeline(io.blueocean.ath.model.ClassicPipeline) Test(org.junit.Test)

Example 3 with ClassicPipeline

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");
}
Also used : ClassicPipeline(io.blueocean.ath.model.ClassicPipeline) Test(org.junit.Test) BlueOceanAcceptanceTest(io.blueocean.ath.BlueOceanAcceptanceTest)

Example 4 with ClassicPipeline

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();
}
Also used : ClassicPipeline(io.blueocean.ath.model.ClassicPipeline) Test(org.junit.Test) BlueOceanAcceptanceTest(io.blueocean.ath.BlueOceanAcceptanceTest)

Example 5 with ClassicPipeline

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();
}
Also used : ActivityPage(io.blueocean.ath.pages.blue.ActivityPage) FreestyleJob(io.blueocean.ath.model.FreestyleJob) ClassicPipeline(io.blueocean.ath.model.ClassicPipeline) Test(org.junit.Test) BlueOceanAcceptanceTest(io.blueocean.ath.BlueOceanAcceptanceTest)

Aggregations

ClassicPipeline (io.blueocean.ath.model.ClassicPipeline)6 Test (org.junit.Test)6 BlueOceanAcceptanceTest (io.blueocean.ath.BlueOceanAcceptanceTest)3 FreestyleJob (io.blueocean.ath.model.FreestyleJob)1 ActivityPage (io.blueocean.ath.pages.blue.ActivityPage)1