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.
FIX Jenkins 38006 Fix condition which had been implemented wrong (#35)
* [JENKINS-38006] first working version to test whethe we have scrolled to bottom * [JENKINS-38006] move method to the page object * [JENKINS-38006] Drop passing browser object to page methods. Add comments to bluePipelineRunDetail and the failing.js.
- Loading branch information
Showing
8 changed files
with
335 additions
and
134 deletions.
There are no files selected for viewing
381 changes: 266 additions & 115 deletions
381
src/main/js/page_objects/blueocean/bluePipelineRunDetail.js
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,46 @@ | ||
/* | ||
* REGRESSION TEST: logs not tailing with freestyle | ||
* | ||
* We will use a simple script which pings 10 times a certain url. | ||
* To provoke that the browser has to scroll we will resize the browser and then test the scrollHeight of the | ||
* parent container. If that is bigger then 0, that means that we have scrolled and the karaoke works as expected. | ||
*/ | ||
// The name of the job | ||
const jobName = 'pingTest'; | ||
module.exports = { | ||
'Create freestyle Job "ping"': function (browser) { | ||
// simple script to ping 10 times a certain url | ||
const freestyleCreate = browser.page.freestyleCreate().navigate(); | ||
freestyleCreate.createFreestyle(jobName, 'freestylePing.sh'); | ||
}, | ||
|
||
'Build freestyle Job': function (browser) { | ||
// build the job | ||
const freestylePage = browser.page.jobUtils().forJob(jobName); | ||
freestylePage.buildStarted(function () { | ||
// Reload the job page and check that there was a build done. | ||
freestylePage | ||
.forRun(1) | ||
.waitForElementVisible('@executer'); | ||
}) | ||
}, | ||
|
||
'Check Job Blue Ocean run detail page - karaoke': function (browser) { | ||
const blueRunDetailPage = browser.page.bluePipelineRunDetail().forRun(jobName, 'jenkins', 1); | ||
|
||
// first resize the browser so we get quickly a level where we will have to scroll | ||
browser.resizeWindow(600, 600); | ||
// wait until the job has finished | ||
blueRunDetailPage.waitForJobRunEnded(jobName) | ||
.waitForElementVisible('code') | ||
.fullLogButtonNotPresent() | ||
.expect.element('code').text.to.contain('Finished: SUCCESS'); | ||
// make sure we have scrolled | ||
blueRunDetailPage.validateScrollToBottom(); | ||
// make the browser big again | ||
browser.resizeWindow(1680, 1050); | ||
|
||
}, | ||
|
||
|
||
}; |
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,2 @@ | ||
#!/usr/bin/env bash | ||
ping spiegel.de -c 10 |