Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #70 from jenkinsci/bug/JENKINS-39992-dupe-rows
Bug/jenkins 39992 dupe rows
  • Loading branch information
imeredith committed Nov 28, 2016
2 parents 9c86819 + af4786e commit a5d3fe7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/test/js/notMultibranch/freestyleRunning.js
@@ -1,3 +1,4 @@
const jobName = 'freeRun';
/** @module freestyleRunning
* @memberof notMultibranch
* @description Freestyle running from activity screen
Expand All @@ -6,12 +7,12 @@ module.exports = {
/** Create freestyle Job */
'Step 01': function (browser) {
const freestyleCreate = browser.page.freestyleCreate().navigate();
freestyleCreate.createFreestyle('freeRun', 'freestyle.sh');
freestyleCreate.createFreestyle(jobName, 'freestyle.sh');
},

/** Build freestyle Job*/
'Step 02': function (browser) {
var blueActivityPage = browser.page.bluePipelineActivity().forJob('freeRun', 'jenkins');
var blueActivityPage = browser.page.bluePipelineActivity().forJob(jobName, 'jenkins');
blueActivityPage.waitForElementVisible('.run-button');

// run the job
Expand All @@ -23,6 +24,10 @@ module.exports = {
blueActivityPage.waitForElementVisible('.progress-spinner');
blueActivityPage.waitForElementVisible('.success');
blueActivityPage.waitForElementNotPresent('.progress-spinner');

browser.elements('css selector', `#${jobName}-1`, function(res) {
browser.assert.equal(1, res.value.length);
})
},

};
9 changes: 7 additions & 2 deletions src/test/js/notMultibranch/pipelineRunning.js
@@ -1,3 +1,4 @@
const jobName = 'pipeRun';
/** @module pipelineRunning
* @memberof notMultibranch
* @description Check can run non multibranch pipelines from activity
Expand All @@ -7,13 +8,13 @@ module.exports = {
'Step 01': function (browser) {
const pipelinesCreate = browser.page.pipelineCreate().navigate();
// we have used the noStages script as basis
pipelinesCreate.createPipeline("pipeRun", 'no-stages.groovy');
pipelinesCreate.createPipeline(jobName, 'noStagesSmallWait.groovy');
},


/** Build pipeline Job*/
'Step 02': function (browser) {
var blueActivityPage = browser.page.bluePipelineActivity().forJob('pipeRun', 'jenkins');
var blueActivityPage = browser.page.bluePipelineActivity().forJob(jobName, 'jenkins');
blueActivityPage.waitForElementVisible('.run-button');

// run the job
Expand All @@ -25,6 +26,10 @@ module.exports = {
blueActivityPage.waitForElementVisible('.progress-spinner');
blueActivityPage.waitForElementVisible('.success');
blueActivityPage.waitForElementNotPresent('.progress-spinner');

browser.elements('css selector', `#${jobName}-1`, function(res) {
browser.assert.equal(1, res.value.length, 'Correct number of runs started');
})
},

};
4 changes: 4 additions & 0 deletions src/test/resources/test_scripts/noStagesSmallWait.groovy
@@ -0,0 +1,4 @@
node {
echo 'Hello World 1'
sleep 1
}

0 comments on commit a5d3fe7

Please sign in to comment.