Search in sources :

Example 11 with MultiBranchPipeline

use of io.blueocean.ath.model.MultiBranchPipeline in project blueocean-plugin by jenkinsci.

the class FavoritesNavigationTest method testMultibranch.

@Test
public void testMultibranch() throws IOException, GitAPIException {
    String branchMaster = "master";
    String branchOther = "feature/1";
    git.writeJenkinsFile(resources.loadJenkinsFile());
    git.addAll();
    git.commit("First");
    git.createBranch(branchOther);
    String jobName = "navigation-multibranch";
    MultiBranchPipeline pipeline = multibranchFactory.pipeline(FOLDER, jobName).createPipeline(git);
    String fullName = pipeline.getFullName();
    // the basics
    addAsFavorite(pipeline);
    checkRunDetails(pipeline);
    back();
    checkActivity(pipeline);
    dashboardPage.open();
    // check the branches tab
    BranchPage branches = navigateBranches(pipeline).checkFavoriteStatus(branchMaster, true).checkFavoriteStatus(branchOther, false).toggleFavoriteStatus(branchOther);
    // test linking to run details
    branches.openRunDetails(branchMaster).checkBasicDomElements().back();
    branches.openRunDetails(branchOther).checkBasicDomElements().back();
    // check dashboard favorites
    go(-2);
    dashboardPage.checkFavoriteCardCount(2);
}
Also used : MultiBranchPipeline(io.blueocean.ath.model.MultiBranchPipeline) BranchPage(io.blueocean.ath.pages.blue.BranchPage) Test(org.junit.Test)

Aggregations

MultiBranchPipeline (io.blueocean.ath.model.MultiBranchPipeline)11 Test (org.junit.Test)9 ActivityPage (io.blueocean.ath.pages.blue.ActivityPage)5 BlueOceanAcceptanceTest (io.blueocean.ath.BlueOceanAcceptanceTest)4 BranchPage (io.blueocean.ath.pages.blue.BranchPage)4 WebElement (org.openqa.selenium.WebElement)2 Retry (io.blueocean.ath.Retry)1 PullRequestsPage (io.blueocean.ath.pages.blue.PullRequestsPage)1 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 URL (java.net.URL)1 Ignore (org.junit.Ignore)1 GHContentUpdateResponse (org.kohsuke.github.GHContentUpdateResponse)1 JavascriptExecutor (org.openqa.selenium.JavascriptExecutor)1 Actions (org.openqa.selenium.interactions.Actions)1