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

Commit

Permalink
[JENKINS-37640] Add test for artifacts tab to not be empty (#27)
Browse files Browse the repository at this point in the history
* [JENKINS-37640] Add test for artifacts tab to not be empty

* [JENKINS-37640] Add test snippet
  • Loading branch information
scherler committed Aug 25, 2016
1 parent 6b8dc96 commit 5062f20
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/js/page_objects/blueocean/bluePipelineRunDetail.js
Expand Up @@ -11,6 +11,7 @@ module.exports = {
followAlongOn: '.step-scroll-area.follow-along-on',
followAlongOff: '.step-scroll-area.follow-along-off',
emptystate: 'div.empty-state',
artifactTable: 'table.artifacts-table',
}
};

Expand Down Expand Up @@ -98,5 +99,10 @@ module.exports.commands = [{
var self = this;
self.waitForElementVisible('@emptystate');
return self;
},
validateNotEmpty: function () {
var self = this;
self.waitForElementVisible('@artifactTable');
return self;
}
}];
5 changes: 5 additions & 0 deletions src/test/js/log-karaoke/stages.js
Expand Up @@ -83,4 +83,9 @@ module.exports = {
blueRunDetailPage.waitForElementVisible('div.empty-state');
},

'Check whether the artifacts tab shows artifacts': function (browser) {
const blueRunDetailPage = browser.page.bluePipelineRunDetail().forRun('stages', 'jenkins', 1);
blueRunDetailPage.clickTab(browser, 'artifacts');
blueRunDetailPage.validateNotEmpty();
}
};
2 changes: 2 additions & 0 deletions src/test/resources/test_scripts/stages-with-wait.groovy
Expand Up @@ -12,5 +12,7 @@ node {
failFast: true
stage 'fin'
sh 'echo `date` fin;sleep 3; echo `date` fin;'
sh 'echo yeah > foo.txt'
archiveArtifacts 'foo.txt'
stage 'NoSteps'
}

0 comments on commit 5062f20

Please sign in to comment.