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.
[JENKINS-37962] Add test for clicking on run button then on the emerg…
…ing toast the open
- Loading branch information
Showing
4 changed files
with
99 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,52 @@ | ||
const jobName = 'parallelStages'; | ||
/** @module stages | ||
* @memberof karaoke | ||
* @description TEST: logs tailing with stages and steps - karaoke mode | ||
* | ||
* Based on three different syntax files we will run the tests against each syntax to make sure they work all as expected. | ||
* We will cover | ||
*/ | ||
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 */ | ||
'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*/ | ||
'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" | ||
} |