-
Notifications
You must be signed in to change notification settings - Fork 727
add documentation for waitforElementToBeRemoved (#103) #105
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
add documentation for waitforElementToBeRemoved (#103) #105
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!! Thanks! I only have two suggestions.
used in Node-based tests. | ||
|
||
The default `container` is the global `document`. Make sure the elements you | ||
wait for will be attached to it, or set a different `container`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to reword this a bit because right now it sounds like it should be a direct child.
@@ -43,6 +43,21 @@ test('movie title goes away', async () => { | |||
}) | |||
``` | |||
|
|||
The `waitForElementToBeRemoved` [async helper][async-api] function uses a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this to be the first example in this section (before the wait
example) because it's probably the better option.
* clarify that observed element must be descendent of container * move waitForElementToBeRemoved example above wait example in guide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except one minor clarification
// logs 'Element no longer in DOM' | ||
``` | ||
|
||
The callback must return the pre-existing element or array of elements that are expected to be removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the explanation that the element(s) must be in the DOM when you call the function should be at the top
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, I'll make that change now!
* move that callback must return element above examples * move error handling from first example to second
Addresses #103
This is my first open-source contribution in many years so please let me know if there's anything I can do to improve. Thanks for the opportunity!