-
Notifications
You must be signed in to change notification settings - Fork 274
feat: add findBy*
queries
#304
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
feat: add findBy*
queries
#304
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.
Missing updates to typings/index.d.ts
for TS users, but from a quick look it looks good!
* prettier did reformat some code arround
I've added typescipt type definitions & tests for that. |
Reversed prettier run on typings files in order to remove noise from the PR :-) |
# Conflicts: # typings/index.d.ts
I've added overlapping parts with |
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.
💯
* Basic async findBy queries * Refactored findBy queries to be built with makeFindQuery * findBy queries for A11y selectors * Custom findByTestId implementation that avoids current getByTestId issues * Fixed prettier issue * Updates Queries.md with findBy queries * Trying to fix test timeout error appearing only on CI * Code review changes * Added typescript types & tests * prettier did reformat some code arround * Removed export of GetByAPI, QueryByAPI and FindByAPI interfaces in TS * Reversed prettier run on typings * Added overlapping pieces with `within` operator * Small cleanup * Update website/docs/Queries.md * Moved async/await tests to the end of test methods Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
* Added @testing-library/jest-native to devDependencies * Tests for jest-native matchers * Added @testing-library/jest-native install info * Update README.md * Update GettingStarted.md * feat: add `findBy*` queries (#304) * Basic async findBy queries * Refactored findBy queries to be built with makeFindQuery * findBy queries for A11y selectors * Custom findByTestId implementation that avoids current getByTestId issues * Fixed prettier issue * Updates Queries.md with findBy queries * Trying to fix test timeout error appearing only on CI * Code review changes * Added typescript types & tests * prettier did reformat some code arround * Removed export of GetByAPI, QueryByAPI and FindByAPI interfaces in TS * Reversed prettier run on typings * Added overlapping pieces with `within` operator * Small cleanup * Update website/docs/Queries.md * Moved async/await tests to the end of test methods Co-authored-by: Michał Pierzchała <thymikee@gmail.com> * chore: bump eslint config to latest (#308) * chore: bump eslint config to latest * lint fix * lint pass * use roles directly * Trying to fix CI build * Added $FlowFixMe for missing flow expect extensions * Small doc fixes * Clarified failing toHaveProps matcher tests * Moved lint ignore for color literals to .eslintrc * Updated toHaveProp tests to avoid strange `Button` behavior * Updated yarn.lock * Update README.md * Update website/docs/GettingStarted.md Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
Summary
Added findBy queries for original queries (ByText, ByPlaceholder, ByDisplayValue, ByTestId) as well as for a11y queries.
Note: in case of
findByTestId
I used custom finding algorithm because current implementation ofgetByTestId
is broken.Test plan
Added units tests for all of the new queries.