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

Commit

Permalink
Excercise the re-run button on results screen
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelneale committed Oct 14, 2016
1 parent 1ec7c0f commit ef3a6cb
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/main/js/page_objects/blueocean/bluePipelineRunDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,18 @@ module.exports.commands = [{
});
browser.useCss();
return self;
},

/**
* failed pipelines have a rerun/replace button button
*/
clickReRunButton: function () {
var self = this;
const browser = this.api;
self.waitForElementVisible('.replay-button');
self.click('.replay-button');
return self;
}


}];
23 changes: 22 additions & 1 deletion src/test/js/failing.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ module.exports = {

// as it has failed, should get a replay button
blueRunDetailPage.waitForElementVisible('.replay-button');



});

},

/**
Expand All @@ -67,6 +70,24 @@ module.exports = {
'Step 04' : function(browser) {
var blueActivityPage = browser.page.bluePipelineActivity().forJob(JOB, 'jenkins');
blueActivityPage.waitForRunFailureVisible(JOB + '-1');
blueActivityPage.waitForElementVisible('.replay-button');
blueActivityPage.waitForElementVisible('.replay-button');
},

/**
* As it has failed, we can rerun the job, check that it runs, and then result is still failure.
*/
'Step 05' : function(browser) {
const blueRunDetailPage = browser.page.bluePipelineRunDetail().forRun(JOB, 'jenkins', 1);

//click the re run button
blueRunDetailPage.clickReRunButton();

//Ccheck that it runs and we could stop if if we want to
blueRunDetailPage.waitForElementVisible('.progress-spinner');
blueRunDetailPage.waitForElementPresent('.stop-button');

// this will show up when it has finished replaying
blueRunDetailPage.waitForElementVisible('.replay-button');

}
};

0 comments on commit ef3a6cb

Please sign in to comment.