-
Notifications
You must be signed in to change notification settings - Fork 718
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 docs for Web Testing Library #1204
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for testing-library ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
3f89381
to
7b227e0
Compare
docs/web-testing-library/intro.mdx
Outdated
Utilities are included in this project based on the following guiding | ||
principles: | ||
|
||
1. They should be usable on both the Web Platform **and** React Native |
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.
The name "web testing library" is a bit confusing if it also works for React Native, which is definitely not the "web". Is the goal of this library to provide a library- and platform- agnostic API to replace some parts of the existing ecosystem?
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.
The goal is not to be platform agnostic (see e.g. ´setTimeout´) but offer shared utilities that are used on the most common platforms
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 see. In that case I'd suggest naming it something that is less similar to the framework wrappers that implement a full element traversal API, and more similar to the util libraries like user-event.
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.
React Native is now official part of the web-interoperable runtimes: https://runtime-keys.proposal.wintercg.org/#react-native
Going to adjust the wording to use "web interoperable" instad of just "web" to make it less similar.
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.
Any reason not to just put waitFor
in its own package?
Co-authored-by: Tim Deschryver <[email protected]>
Co-authored-by: Tim Deschryver <[email protected]>
Several utilities are provided for dealing with asynchronous code. These can be | ||
useful to wait for an element to appear or disappear in response to an event, | ||
user action, timeout, or Promise. (See the | ||
[guide to testing disappearance](guide-disappearance.mdx).) |
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.
Does this link work?
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.
This works, it redirects to https://deploy-preview-1204--testing-library.netlify.app/docs/guide-disappearance
Switching to "Web-interoperable Testing Library" and |
@eps1lon should we also rename the |
Docs for the initial release of Web Testing Library.
waitFor
API is implemented in testing-library/web-testing-library#2.The name is born out of pragmatism. A preciser name would be "Web-interoperable runtimes Testing Library" but life is too short to spell that out.
Preview