* feature: screen
* feature: update docs
* refactor: add flow type
* docs: more
* docs: final tweaks
* test rerender
* code review changes
* alias RenderResult to RenderAPI
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
* Add TextMatch options to getByAPI
* Add TextMatch options to queryByAPI
* Add TextMatch options to findByAPI
* Add tests covering new TextMatch options
* Add documentation and examples for TextMatch options
* Implement text match normalization customization
* Implement tests for normalization options
* Add text normalization docs
* Refactor typings
* Add export for getDefaultNormalizer function
* Remove undocumented config for normalizer function
* Update website/docs/Queries.md
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
* BREAKING: make findBy* queries arguments order compatible with RTL
* Fix tests for findBy queries after changing their API
* Fix matching nested Text components with queryOptions exact set to true
* Remove recursion matching for *byText APIs
* Reuse getAllByText in getByText
* Add Textmatch options to *byTestId
* fix: types for getDefaultNormalizer
* refactor: remove makeNormalizer and use getDefaultNormalizer() instead
* refactor: change params position and description for matches
* refactor: move & remove duplicated tests after merge
* Make waitForOptions param change non breaking change
* chore: cleanup and type fixups
* tests: update snapshots
* chore: use default arg value for normalizer
* Restore mock after use
* fix: wrong snapshot update with outdated deps
Co-authored-by: Rafał Zakrzewski <zakrzewski.rafal@gmail.com>
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
Co-authored-by: Damian Sznajder <damsznajder@gmail.com>
* capture global timers, use them in waitFor, tests+
* use real timers in flushMicroTasks
* test to show changes with modern timer mocks
* use enum-like object for timer modes
* fix tests
* remove default timer mode, add flow types
export other timer helpers, adjust tests and docs
* base waitFor on RTL implementation
* [jest] Capture and restore global promise
* [waitFor] Simulate intervals when using fake timers
* [tests] Fix waitForElementToBeRemoved
* cleanups; use more specific global
* rename globals to match others
Co-authored-by: Michael James Duminy <michael-james.duminy@klarna.com>
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
* feat: export root test instance from render
* test: add tests for root test instance returned from render function
* docs: add description about root test instance returned from render function
* feat: change root export to container and wrap component in View if no wrapper defined
* docs: update description about container test instance returned from render function
* test: update tests for root test instance returned from render function
* test: clean up comments in tests
* feat: add react-native as peerDependency, clean up lint ignore for lines that was importing react-native
* revert adding default wrapper
* rework tests
* reword docs
* add testID checks
* add comments
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
* docs: Port How Should I Query guide
* fixup! docs: Port How Should I Query guide
* Update website/docs/HowShouldIQuery.md
* reword
* add getByAccessibilityState getByAccessibilityValue
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
* docs: remove byTestId misleading warnings
* change caution to warning, mention principles and accessibility guideline
* promote new aliases in docs example
* rephrase
* fix: package reference in docs
* fix: more references to package name
* Update README.md
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
* Update website/docs/GettingStarted.md
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
* Update website/docs/API.md
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
* feat: Add alias accessibilityLabel queries to assist in migrating from @testing-library/react-native
* feat: Add alias accessibilityHint queries to assist in migrating from @testing-library/react-native
* feat: Add alias accessibilityRole queries to assist in migrating from @testing-library/react-native
* feat: Add to A11yAPI types to include the newly-aliased queries for label, hint, and role
* test: Add tests for newly-aliased label, hint, and role a11y queries
* test: Add newly-alised a11y queries to the index typings test file
* docs: Add query aliases for testing library migrators to Queries documentation
* test: Consolidate aliased query tests into shared tests. FIXME's where there are errors
* test: Update a11yAPI tests to assert referential equality for query aliases
* refactor: apply Prettier formatting to a11yAPI test file
* fix: address typos in CONTRIBUTING.md
* test: Separate referential quality assertion tests for query aliases into their own tests
Co-authored-by: Ryan Wessel <rwessel@dataminr.com>