mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-27 05:11:42 -04:00
test: make Selenium wait timeouts consistent
This commit is contained in:
parent
d7fdb4729f
commit
4fb4eaab76
1 changed files with 3 additions and 3 deletions
|
@ -307,7 +307,7 @@ class SeleniumHelper {
|
|||
async waitUntilGone (element) {
|
||||
const outerError = new SeleniumHelperError('waitUntilGone failed', [{element}]);
|
||||
try {
|
||||
await this.driver.wait(until.stalenessOf(element));
|
||||
await this.driver.wait(until.stalenessOf(element), DEFAULT_TIMEOUT_MILLISECONDS);
|
||||
} catch (cause) {
|
||||
await outerError.collectContext(this.driver);
|
||||
throw outerError.chain(cause);
|
||||
|
@ -461,7 +461,7 @@ class SeleniumHelper {
|
|||
async urlMatches (regex) {
|
||||
const outerError = new SeleniumHelperError('urlMatches failed', [{regex}]);
|
||||
try {
|
||||
await this.driver.wait(until.urlMatches(regex), 1000 * 5);
|
||||
await this.driver.wait(until.urlMatches(regex), DEFAULT_TIMEOUT_MILLISECONDS);
|
||||
} catch (cause) {
|
||||
outerError.collectContext(this.driver);
|
||||
throw outerError.chain(cause);
|
||||
|
@ -527,7 +527,7 @@ class SeleniumHelper {
|
|||
static async waitUntilVisible (element, driver) {
|
||||
const outerError = new SeleniumHelperError('waitUntilVisible failed', [{element}]);
|
||||
try {
|
||||
await driver.wait(until.elementIsVisible(element));
|
||||
await driver.wait(until.elementIsVisible(element), DEFAULT_TIMEOUT_MILLISECONDS);
|
||||
} catch (cause) {
|
||||
outerError.collectContext(driver);
|
||||
throw outerError.chain(cause);
|
||||
|
|
Loading…
Add table
Reference in a new issue