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

Commit

Permalink
[JENKINS-37753] Implement AT test. WARNING not test due to problems w…
Browse files Browse the repository at this point in the history
…ith the update center mirror
  • Loading branch information
scherler committed Sep 22, 2016
1 parent ece4cf9 commit 6d1d543
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/main/js/page_objects/blueocean/bluePipelineRunDetail.js
Expand Up @@ -33,6 +33,7 @@ module.exports = {
tests: 'div.new-failure-block div.result-item',
authors: 'a.authors',
circleSuccess: 'svg circle.success',
runningResult: 'span.result-item-icon.running',
firstResult: {
selector: '//div[contains(@class, "result-item") and position()=1]',
locateStrategy: 'xpath',
Expand Down Expand Up @@ -215,7 +216,7 @@ module.exports.commands = [{
// the progressBar should be present
self.waitForElementVisible('@progressBar');
// when we are loading the code element should not be present
this.expect.element('@code').to.not.be.present.before(1000);
self.expect.element('@code').to.not.be.present.before(1000);
return self;

},
Expand Down Expand Up @@ -385,6 +386,15 @@ module.exports.commands = [{
// to make component chain-able we will return self - part 2
});
return self;
},

/**
* We are validating that there are no running nodes visible anymore
* @returns {Object} self - nightwatch page object
*/
validateNotRunningResults: function () {
this.expect.element('@runningResult').to.not.be.present.before(1000);
return this;
}

}];
19 changes: 18 additions & 1 deletion src/test/js/log-karaoke/parallelStages.js
Expand Up @@ -52,7 +52,24 @@ module.exports = {
* */
'Step 04': function (browser) {
browser.waitForJobRunEnded(jobName, function () {
// Here will test for JENKINS-37753
/*
* Here we will test for JENKINS-37753 -> IF groovy changes this might to be adopted
*/
const blueRunDetailPage = browser.page.bluePipelineRunDetail().forRun(jobName, 'jenkins', 1);
// we should be on the last stage of the pipeline by now
blueRunDetailPage.validateNotRunningResults();
// navigate to the first stage in the pipeline
blueRunDetailPage.forNode(5);
blueRunDetailPage.validateNotRunningResults();
// navigate to the first stage in the parallel step in the pipeline
blueRunDetailPage.forNode(10);
blueRunDetailPage.validateNotRunningResults();
// sample taken at random for logs to see whether they are truncated
blueRunDetailPage.validateNotRunningResults();
// navigate to the second stage in the parallel step in the pipeline
blueRunDetailPage.forNode(11);
blueRunDetailPage.validateNotRunningResults();

});
}
};

0 comments on commit 6d1d543

Please sign in to comment.