use of io.blueocean.ath.pages.blue.BranchPage in project blueocean-plugin by jenkinsci.
the class NavigationTest method testBranchHistory.
/**
* This test clicks on the history button on a branch, and makes sure that it navigates to the activity page
* on the correct url.
*/
@Test
public void testBranchHistory() throws IOException, GitAPIException {
git.writeJenkinsFile(loadJenkinsFile());
git.addAll();
git.commit("Added Jenkinsfile");
git.createBranch("feature/1");
git.createBranch("feature@2");
MultiBranchPipeline pipeline = multiBranchPipelineFactory.pipeline(Folder.folders("a folder", "bfolder", "folder"), "NavigationTest_testNavigation");
pipeline.createPipeline(git);
dashboardPage.open();
dashboardPage.clickPipeline(pipeline.getName());
ActivityPage activityPage = pipeline.getActivityPage().checkUrl();
BranchPage branchPage = activityPage.clickBranchTab();
branchPage.clickHistoryButton("feature/1");
activityPage.open();
activityPage.getRunRowForBranch("feature@2").click();
pipeline.getRunDetailsPipelinePage().checkUrl("feature%402", 1);
pipeline.getRunDetailsPipelinePage().checkBasicDomElements();
}
use of io.blueocean.ath.pages.blue.BranchPage in project blueocean-plugin by jenkinsci.
the class GithubEditorTest method testEditor.
/**
* This test covers e2e usage of the editor.
*
* Creates a blank github repo, and then uses editor to create a simple pipeline.
*/
@Test
public void testEditor() throws IOException {
creationPage.createPipeline(token, organization, repo, true);
MultiBranchPipeline pipeline = mbpFactory.pipeline(repo);
editorPage.simplePipeline();
ActivityPage activityPage = pipeline.getActivityPage().checkUrl();
driver.navigate().refresh();
sseClient.untilEvents(pipeline.buildsFinished);
sseClient.clear();
BranchPage branchPage = activityPage.clickBranchTab();
branchPage.openEditor("master");
editorPage.saveBranch("new - branch");
activityPage.checkUrl();
activityPage.getRunRowForBranch("new-branch");
sseClient.untilEvents(pipeline.buildsFinished);
}
use of io.blueocean.ath.pages.blue.BranchPage in project blueocean-plugin by jenkinsci.
the class GithubEditorTest method testEditorParallel.
/**
* This test covers e2e usage of the editor. Does so with a parallel pipeline.
*
* Creates a blank github repo, and then uses editor to create a parallel pipeline.
*/
@Test
public void testEditorParallel() throws IOException {
creationPage.createPipeline(token, organization, repo, true);
MultiBranchPipeline pipeline = mbpFactory.pipeline(repo);
editorPage.parallelPipeline("branch-with-parallels", 3);
ActivityPage activityPage = pipeline.getActivityPage().checkUrl();
driver.navigate().refresh();
sseClient.untilEvents(pipeline.buildsFinished);
sseClient.clear();
BranchPage branchPage = activityPage.clickBranchTab();
branchPage.openEditor("branch-with-parallels");
editorPage.saveBranch("new - branch");
activityPage.checkUrl();
activityPage.getRunRowForBranch("branch-with-parallels");
sseClient.untilEvents(pipeline.buildsFinished);
}
use of io.blueocean.ath.pages.blue.BranchPage 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);
}
Aggregations