Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: migration errors in wait methods #65

Merged
merged 5 commits into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "DHIS2 E2E testing",
"dependencies": {
"@wdio/allure-reporter": "^5.16.0",
"@wdio/allure-reporter": "^6.8.1",
"@wdio/browserstack-service": "^6.10.4",
"@wdio/cli": "^6.10.5",
"@wdio/cucumber-framework": "^6.10.4",
Expand Down
6 changes: 3 additions & 3 deletions support/wait/waitForVisible.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/**
* Wait for the given element to become visible
* @param {String} elem Element selector
* @param {String} falseCase Whether or not to expect a visible or hidden
* @param {String} reverse Whether or not to expect a visible or hidden
* state
*
* @todo merge with waitfor
*/
module.exports = (elem, falseCase) => {
module.exports = (elem, reverse) => {
/**
* Maximum number of milliseconds to wait for
* @type {Int}
*/
const ms = 10000;
elem.waitForDisplayed(ms, !!falseCase);
elem.waitForDisplayed(ms, {reverse: reverse});
};
11 changes: 8 additions & 3 deletions support/wait/waitForWindowToLoad.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ module.exports = () => {
return false;
}
}
browser.waitUntil(() => {
return check()
}, 40000, 'Page didnt load in 40s', 700)

browser.waitUntil(
() => { return check()},
{
timeout: 40000,
timeoutMsg: 'Page didnt load in 40s',
interval: 700
})
}