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

waitWhileElement #683

Merged
merged 4 commits into from
Sep 18, 2017
Merged

waitWhileElement #683

merged 4 commits into from
Sep 18, 2017

Conversation

sabau
Copy link
Contributor

@sabau sabau commented Aug 25, 2017

Hi,
as described in the issue waitWhileElement I was trying to replicate a feature I was used to. I hope to have covered everything from helpers to docs update to tests coverage.

I hope it can be a useful feature. I often have to wait random amount of time due to slow DB, high loads, different environments to be tested, usually some graphical elements disappears (modals or spinner).

Best regards,
Karoly

Karoly Albert Szabo added 2 commits August 25, 2017 10:44
…r waitWhileElement and new spinner test page, documentation updated with gulp docs
@DavertMik
Copy link
Contributor

Thanks, for the comprehensive implementation and tests
However, I don't find the naming really good. Wait whileElement sounds to abstract to me, I'd never guess what it waits for before I go to docs. I think it should be much more descriptive. How about
waitToDisappear or waitForElementToDisappear? Maybe you could have another good ideas?

Also please fix the SeleniumWebdriver implementation. Thanks

@sabau
Copy link
Contributor Author

sabau commented Aug 28, 2017

True, is just took it as it was. Disappear maybe can be confused with the concept of visibility, what about waitForElementRemoval or waitUntilElementRemoved?

Sorry, I missed that SeleniumWebdriver bug, I'll fix it as soon as I can.

@APshenkin
Copy link
Collaborator

@sabau @DavertMik There is already implementation for WebdriverIO - waitForInvisible and waitForStalenessOf
I think we can use this names for methods

@sabau
Copy link
Contributor Author

sabau commented Aug 31, 2017

Hi @APshenkin,
I was looking at them, they are very similar, I think the main differences are:

  • waitForStalenessOf is expecting the element to be present and disappear after a while, but we can't be sure everytime that the element is there.
  • waitForInvisible is satisfied both when all elements are removed or when all elements become invisible, it covers this new call, but have a wider scope.

But looking at WebdriverIO/jquery I was missing the classical name waitUntilExists

@DavertMik
Copy link
Contributor

Yes, waitUntilExists looks better to me

@sabau
Copy link
Contributor Author

sabau commented Sep 18, 2017

Hi @DavertMik, sorry for the long waiting.
Ok, then I'll fix the naming ASAP, hopefully today.

@DavertMik
Copy link
Contributor

Thank you!

@DavertMik DavertMik merged commit 09680d6 into codeceptjs:master Sep 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants