Merge pull request #4709 from dsesami/flake-wait

Added a longer timeout for spinny specifically

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-09-11 14:39:05 +00:00 committed by GitHub
commit 788c5d3741
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -6,7 +6,8 @@ exports.command = function navigateTo (url, expectSpinny = true) {
if (expectSpinny) {
this.waitForElementVisible(spinny, () => {
this.waitForElementNotVisible(spinny);
// If a process is running, give spinny a little more time before timing out.
this.waitForElementNotVisible(spinny, 30000);
});
}

View File

@ -5,6 +5,9 @@ exports.command = function waitForSpinny (useXpath = false) {
selector = '//*[contains(@class, "spinny")]';
}
this.waitForElementVisible(selector);
this.waitForElementNotVisible(selector);
// if a process is running for an extended period,
// spinny might last longer than five seconds.
// this gives it a max of 30 secs before failing.
this.waitForElementNotVisible(selector, 30000);
return this;
};