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

update waitForElement to support waitUntil in webdriverio^6.0 #2313

Merged
merged 1 commit into from
Apr 5, 2020

Conversation

Mooksc
Copy link
Contributor

@Mooksc Mooksc commented Apr 2, 2020

Motivation/Description of the PR

  • When using WebDriver helper with webdriverio@^6.0, the waitForElement function is not applying the optional second argument to override the default timeout length.
  • WebDriverIO v6 updates waitUntil method which is used by all of the wait* functions. Many of these function were updated, such as waitForVisible and waitInUrl however waitForElement appears to still use the webdriverio@^5.0 code.
  • This updates the waitForElement function by the same convention used to update waitForVisible and waitInUrl to be compatible with both WebDriverIO v5 & v6.

Applicable helpers:

  • WebDriver

Type of change

  • 🐛 Bug fix
  • ♨️ Hot fix

Notes

  • I was unable to configure the repo to run the tests in examples directory. I implemented tests for this fix on a branch I use myself, so any guidance in implementing a test for this would be appreciated. 😄

@DavertMik
Copy link
Contributor

Codacy Here is an overview of what got changed by this pull request:

Clones added
============
- lib/helper/WebDriver.js  5
         

See the complete overview on Codacy

@kobenguyent
Copy link
Collaborator

@Mooksc what prevents you from running tests locally?

@Mooksc
Copy link
Contributor Author

Mooksc commented Apr 3, 2020

@Mooksc what prevents you from running tests locally?

Hey @peterngtr - I was running into errors like Cannot read 'name' of undefined when following the instructions in the contributing guidelines for running tests locally in the fork - when trying to run node bin/codecept.js run -c examples for example.

@kobenguyent
Copy link
Collaborator

kobenguyent commented Apr 3, 2020

@Mooksc
Copy link
Contributor Author

Mooksc commented Apr 3, 2020

https://github.com/Codeception/CodeceptJS/blob/master/.github/CONTRIBUTING.md#testing have you followed this guide?

Oh wow - I was using that guide but it looks like I didn't read far enough 😛 The docker-compose solution worked 👍 running the unit tests now. Thanks!

@DavertMik
Copy link
Contributor

Thank you!

@DavertMik DavertMik merged commit 0052184 into codeceptjs:master Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants