-
Notifications
You must be signed in to change notification settings - Fork 467
Closed
Labels
BREAKING CHANGEThis change will require a major version bumpThis change will require a major version bumpneeds discussionWe need to discuss this to come up with a good solutionWe need to discuss this to come up with a good solutionreleased
Description
Just a thought. What if we remove waitForElement
in favor of find*
queries?
For history: waitForElement
was created before find*
queries. Now that we have find*
queries, I don't see much of a reason to continue to support it. Most of the time you can use a query, and in the rare situation where you can't use a query to get an element, then you can use wait
:
const element = await wait(() => {
const el = container.querySelector('.blah')
if (!el) throw new Error('cannot find element with .blah')
return el
})
It's a bit of boilerplate, but keep in mind that this is not something people should be doing very often nor is it something we want to encourage people to do.
I believe that some of the usages of waitForElement
could be codemodable, but not all of it.
Thoughts?
timdeschryver, weyert, aw-davidson and thinkerelwin
Metadata
Metadata
Assignees
Labels
BREAKING CHANGEThis change will require a major version bumpThis change will require a major version bumpneeds discussionWe need to discuss this to come up with a good solutionWe need to discuss this to come up with a good solutionreleased