This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX Jenkins-37962 REGRESSION: parallel karaoke not allowing branch se…
…lection or completing correctly (#42) * [JENKINS-37962] Add test for clicking on run button then on the emerging toast the open * [JENKINS-37962] Update comment to describe test case * [JENKINS-37962] better documentation of the steps
- Loading branch information
Showing
4 changed files
with
105 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
const jobName = 'parallelStages'; | ||
/** @module stages | ||
* @memberof karaoke | ||
* @description REGRESSION-TEST: parallel karaoke not allowing branch selection or completing correctly | ||
* @see {@link https://issues.jenkins-ci.org/browse/JENKINS-37962|JENKINS-37962} | ||
* | ||
* TODO @see {@link https://issues.jenkins-ci.org/browse/JENKINS-37753|JENKINS-37753} | ||
* REGRESSION: Steps showing up as incomplete when they are in fact complete | ||
* | ||
*/ | ||
module.exports = { | ||
/** Create Pipeline Job "parallelStages" */ | ||
'Step 01': function (browser) { | ||
const pipelinesCreate = browser.page.pipelineCreate().navigate(); | ||
pipelinesCreate.createPipeline(jobName, 'parallel-stages.groovy'); | ||
}, | ||
/** Build Pipeline Job*/ | ||
'Step 02': function (browser) { | ||
const pipelinePage = browser.page.jobUtils().forJob(jobName); | ||
pipelinePage.buildStarted(function () { | ||
// Reload the job page and check that there was a build done. | ||
pipelinePage | ||
.waitForElementVisible('div#pipeline-box') | ||
.forRun(1) | ||
.waitForElementVisible('@executer'); | ||
}); | ||
}, | ||
/** Check Job Blue Ocean Pipeline Activity Page has run. | ||
* Check different nodes of the graph, first check that we are in first branch and that we have steps. | ||
* Then change to the second parallel tree and check the same as before for the secondBranch*/ | ||
'Step 03': function (browser) { | ||
const blueActivityPage = browser.page.bluePipelineActivity().forJob(jobName, 'jenkins'); | ||
// Check the run itself | ||
blueActivityPage.waitForRunRunningVisible('parallelStages-1'); | ||
const blueRunDetailPage = browser.page.bluePipelineRunDetail().forRun(jobName, 'jenkins', 1); | ||
blueRunDetailPage.validateGraph(); | ||
// if we have the first stage finished we can go on | ||
blueRunDetailPage.waitForElementPresent('@circleSuccess'); | ||
// see whether we have focus on the first branch | ||
blueRunDetailPage.assertLogTitle('firstBranch'); | ||
// give some time by waiting on 2 steps showing up | ||
blueRunDetailPage.validateSteps(2); | ||
// navigate to the secondBranch | ||
blueRunDetailPage.forNode(11); // -> IF groovy changes this might to be adopted | ||
// see whether we have focus on the second branch | ||
blueRunDetailPage.assertLogTitle('secondBranch'); | ||
// we should have now 2 steps | ||
blueRunDetailPage.validateSteps(2); | ||
}, | ||
/** Wait for job to end, TODO: then validate that the steps are all marked as finished | ||
* TODO @see {@link https://issues.jenkins-ci.org/browse/JENKINS-37753|JENKINS-37753} | ||
* */ | ||
'Step 04': function (browser) { | ||
browser.waitForJobRunEnded(jobName, function () { | ||
// Here will test for JENKINS-37753 | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
node { | ||
stage "hey" | ||
sh "echo yeah" | ||
|
||
stage "parallel" | ||
|
||
parallel firstBranch: { | ||
sh 'echo `date` Stage 2 - firstBranch www.spiegel.de' | ||
sh 'ping -c 3 -i 1 www.spiegel.de' | ||
|
||
}, secondBranch: { | ||
sh 'echo `date` Stage 2 - secondBranch www.stern.de' | ||
sh 'ping -c 5 -i 1 www.stern.de' | ||
} | ||
|
||
stage "ho" | ||
sh "echo done" | ||
} |