Skip to content

Commit

Permalink
[nodejs] Fixing tests for explicit waits, we should use polling inter…
Browse files Browse the repository at this point in the history
…val shorter than timeout
  • Loading branch information
barancev committed Jan 31, 2019
1 parent 09210de commit 9b3fa5a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions javascript/node/selenium-webdriver/test/lib/webdriver_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ describe('WebDriver', function() {
.then(() => assert.equal(3, count));
});

it('on a condition that returns a promise', function() {
it('on a condition that returns a promise that resolves to true after a short timeout', function() {
let executor = new FakeExecutor();
let driver = executor.createDriver();

Expand Down Expand Up @@ -1066,7 +1066,7 @@ describe('WebDriver', function() {
});
}

return driver.wait(condition, 100)
return driver.wait(condition, 100, null, 25)
.then(() => assert.equal(3, count));
});

Expand Down Expand Up @@ -1198,7 +1198,7 @@ describe('WebDriver', function() {
var driver = executor.createDriver();
return driver.wait(function() {
return driver.findElements(By.id('foo')).then(els => els.length > 0);
}, 200);
}, 200, null, 25);
});

it('waitTimesout_timeoutCaught', function() {
Expand Down Expand Up @@ -1232,7 +1232,7 @@ describe('WebDriver', function() {
.end();

let driver = executor.createDriver();
return driver.wait(until.elementLocated(By.id('foo')), 200);
return driver.wait(until.elementLocated(By.id('foo')), 200, null, 25);
});

it('wait times out', function() {
Expand Down

0 comments on commit 9b3fa5a

Please sign in to comment.