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

Add docs for Web Testing Library #1204

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Jan 14, 2023

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

@netlify
Copy link

netlify bot commented Jan 14, 2023

Deploy Preview for testing-library ready!

Name Link
🔨 Latest commit 2c1e259
🔍 Latest deploy log https://app.netlify.com/sites/testing-library/deploys/63e79fa8dd9d1a0008274975
😎 Deploy Preview https://deploy-preview-1204--testing-library.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@eps1lon eps1lon force-pushed the feat/wtl branch 2 times, most recently from 3f89381 to 7b227e0 Compare January 14, 2023 08:37
docs/web-testing-library/faq.mdx Outdated Show resolved Hide resolved
docs/web-testing-library/api.mdx Outdated Show resolved Hide resolved
docs/web-testing-library/api.mdx Outdated Show resolved Hide resolved
docs/web-testing-library/api.mdx Outdated Show resolved Hide resolved
docs/web-testing-library/install.mdx Outdated Show resolved Hide resolved
docs/web-testing-library/intro.mdx Outdated Show resolved Hide resolved
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
Copy link
Collaborator

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?

Copy link
Member Author

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

Copy link
Collaborator

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.

Copy link
Member Author

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.

Copy link
Collaborator

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?

eps1lon and others added 3 commits February 9, 2023 12:32
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
docs/web-testing-library/api.mdx Outdated Show resolved Hide resolved
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
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).)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this link work?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eps1lon
Copy link
Member Author

eps1lon commented Feb 16, 2023

Switching to "Web-interoperable Testing Library" and @testing-library/web-interoperable. It's a bit unwieldy but I suspect that it's mostly used internally or re-exported from the actual testing libraries. The new name should ensure that people don't confuse it with a Testing Library for "the Web".

@MatanBobi
Copy link
Member

MatanBobi commented Feb 18, 2023

@eps1lon should we also rename the @testing-library/web repo and package name to testing-library-web-interoperable and @testing-library/web-interoperable accordingly? Want me to do it?

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

4 participants