85 Commits

Author SHA1 Message Date
Nir Yosef 8356d2cff9 Ignore fake timers (#1169) 2022-10-18 13:41:28 +02:00
Maciej Jastrzebski 28aa750aea docs: add typedefs for queries (#1175) 2022-10-18 08:01:33 +02:00
Josh Justice 190df67b16 Eslint plugin docs typos (#1157) 2022-10-02 22:32:37 +02:00
Maciej Jastrzebski 932c547b3b feature: configure API from DTL (#1141) 2022-09-27 16:18:55 +02:00
Maciej Jastrzebski fa21fc52d4 feat: isInaccessible API form RTL/DTL (#1128) 2022-09-23 19:33:48 +02:00
Augustin Le Fèvre c9ab3cf549 Add support for ByRole with name (#1127)
Co-authored-by: Kiran Jd <kiranjd8@gmail.com>
2022-09-22 14:34:51 +02:00
Maciej Jastrzebski 9892c21d2d docs: document render options (#1129) 2022-09-20 11:56:55 +02:00
Gabiveu1574 1089c3ea45 corrected typo on line 44 from targes to targets (#1108) 2022-09-09 08:28:50 +02:00
AlanWen2016 bf8bc45675 Update API.md (#1075)
Update API.md
2022-08-25 11:03:36 +02:00
Maciej Jastrzebski f3969d07ff chore: update troubleshooting guide with typical error messages (#1073) 2022-08-23 23:30:33 +02:00
Maciej Jastrzebski 6108b95552 docs: troubleshooting guilde (#1065) 2022-08-18 14:26:39 +02:00
Maciej Jastrzebski 14dba849d7 docs: v11 migration changelog link (#1023) 2022-07-25 18:13:19 +02:00
Zolboobayar 4ee53422e0 fix(docs): typo in v11 migration guide title (#1022) 2022-07-25 17:58:46 +02:00
Maciej Jastrzebski a80e0c338b docs: v11 migration guide (#1021)
* docs: v11 migration guide

* docs: tweaks

* docs: more tweaks

* tweaks
2022-07-25 16:23:57 +02:00
Maciej Jastrzebski 9f3b31dd9d refactor: remove deprecated byA11yStates queries (#1015) 2022-07-20 12:33:19 +02:00
Maciej Jastrzebski f6fe982f65 docs: create document describing act function and related errors (#969)
* docs: initial act doc

* self code review

* docs: self code review

* docs: applied type fixes

* docs: further updates
2022-07-19 12:00:03 +02:00
Maciej Jastrzebski 5d681790bf feat: add screen API (#994)
* 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>
2022-06-24 13:17:06 +02:00
Maciej Jastrzebski 597fa3c4f8 docs: add FAQ page and native features question (#979)
* docs: add FAQ page and native features question

* docs: fixed grammar issues & added native examples
2022-06-02 14:06:43 +02:00
Maciej Jastrzebski 4f7dd48073 docs: table of contents for Queries and API pages (#980)
* docs: add toc for APIs

* docs: add toc for Queries
2022-05-27 15:53:00 +02:00
rvasseur31 16bb83c78a Update ReduxIntegration.md (#976)
We will test 'AddTodo' and not 'TodoElem'
Add '.test' to the second file as well as for 'AddTodo.test.js'
2022-05-10 11:00:23 +02:00
Raghavender Mylagary 256cd60a58 Fix QuestionsBoard example url (#968) 2022-05-04 11:23:43 +02:00
Michael Peyper 3fa42d5950 docs(renderHook): remove references to error and all from renderHook API (#963)
* docs(renderHook): remove references to error and all from renderHook API

* docs(renderHook): update code snippets to use TS
2022-05-03 22:14:48 +02:00
Pierre Zimmermann 564e99056a feat: add renderHook function (#923)
* feat: add renderHook function

* docs: add documentation on renderhook

* chore(renderHook): add flow typing

* docs: improve readability and consistency

Co-authored-by: pierrezimmermann <pierrez@nam.tech>
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2022-04-26 14:53:59 +02:00
Helena Ford c42237e42d fix(docs): links in API.md (#958)
* fix(docs): links in API.md

* Update API.md
2022-04-23 14:25:15 +02:00
Niraj Niroula 9810edf512 Update GettingStarted.md (#954)
Valid example URL
2022-04-12 16:45:25 +02:00
Augustin Le Fèvre 1360b73295 feat(breaking): migrate Flow to TS; remove some deprecated functions and aliases (#881)
* Port types to TS

* Fix CI commands

* Fix typo in yml file

* Address PR comments

* Remove aliased accessibility queries

* Add flow types

* Update build to support TS

* Clean up removed aliased queries

* Move @babel/plugin-transform-flow-strip-types to test config

* Address PR comments

* Delete flow tests

* Retrigger pipeline

* Update src/helpers/timers.ts

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2022-03-25 16:54:30 +01:00
George Kartalis a010ffdbca docs: fix textmatch broken link (#903)
* docs: fix textmatch broken link

* docs: fix normalization link
2022-01-20 22:00:32 +01:00
Pierre Zimmermann c42bae123d docs: add doc on compatibility with eslint-plugin-testing-library (#884)
* docs: add doc on compatibility with eslint-plugin-testing-library

* Update website/docs/EslintPLluginTestingLibrary.md

* Update website/docs/EslintPLluginTestingLibrary.md

Co-authored-by: pierrezimmermann <pierrez@nam.tech>
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2021-12-20 10:06:04 +01:00
Augustin Le Fèvre cf68c816c0 docs: Add v9 migration guide (#876)
* Add v9 release docs

* Apply suggestions from code review

* chore: text adjustments

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2021-12-03 23:37:46 +01:00
Augustin Le Fèvre 31ef0b92ed feat(breaking): add text match options a.k.a string precision API (#554)
* 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>
2021-11-23 16:30:25 +01:00
Augustin Le Fèvre 3735b0e41f Forward extra data to press event (#828) 2021-10-15 21:02:34 +02:00
Nick McCurdy b6ec6b0198 chore: rename default branch to main (#784) 2021-10-15 20:39:35 +02:00
Güven Karanfil 2f5208b93b docs: fix minimum react-native version for async act to 0.61 (#836) 2021-10-15 20:09:34 +02:00
Ray Chan e1d80d65fc docs: update NativeAnimatedHelper mock path in React Navigation example (#712)
* docs: update jest.mock for 'NativeAnimatedHelper' in React Navigation example (#711)

* Update website/docs/ReactNavigation.md

* Update website/docs/ReactNavigation.md

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2021-04-03 12:00:31 +02:00
McSam bc3d1bc4e8 docs: update Jest transformIgnorePatterns for React Navigation docs (#704) 2021-03-19 14:05:54 +01:00
Mike Duminy 2ccec3c3a3 fix(breaking): use real timers internally to fix awaiting with fake timers (#568)
* 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>
2021-03-02 13:49:30 +01:00
Thakur Ballary 7b159a47e3 Fixed broken link of mock setup file (#673) 2021-02-28 20:50:03 +01:00
Aleksandra Desmurs-Linczewska 199de62c74 Adding tests for React Navigation Drawer Navigator (#624)
* test - React Navigation Drawer

* docs - updated documentation for the website

* docs - added Drawer Navigator test to the website

* actioning PR suggestions

* docs - simple doc cleanup;
2021-01-08 10:36:21 +01:00
Cory Cunningham 05455b17c1 docs update for fireEvent.onScroll() (#633) 2020-12-11 18:17:55 +01:00
Michał 91200ef448 Updated React imports (#629)
Co-authored-by: Michał Parkitny <michal.parkitny@callstack.com>
2020-12-10 10:44:02 +01:00
Ryan J. Wessel cd49dd4754 fix: Update "How Should I Query?" links to use the correct URLs (#580)
Co-authored-by: Ryan Wessel <rwessel@dataminr.com>
2020-10-26 17:18:57 +01:00
Michał Klekowski 78fb456b8a feat: export container from render (#567)
* 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>
2020-10-21 12:26:01 +02:00
Panagiotis Plytas 85bccf2f6a docs: Port 'How Should I Query?' guide from Native Testing Library (#555)
* 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>
2020-10-12 19:07:36 +02:00
अभिनाश (Avinash) a95a3b0e73 Minor grammatical change (#551) 2020-09-26 10:15:47 +02:00
Michał Pierzchała a0faf69bea docs: adjust ByTestId misleading warnings; add guidelines about accessibilityHint (#542)
* docs: remove byTestId misleading warnings

* change caution to warning, mention principles and accessibility guideline

* promote new aliases in docs example

* rephrase
2020-09-11 13:18:52 +02:00
David Calhoun 7ba31524c5 Clarify waitFor documentation in regards to timer mocks (#540)
Update documentation to explicitly state that one should not await the
return or resolution of a `waitFor` call when relying upon timer mocks.
2020-09-09 15:58:31 +02:00
David Calhoun 7e14ade779 Clarify waitFor documentation in regards to timer mocks (#538)
Update documentation to explicitly state that one should not await the
return or resolution of a `waitFor` call when relying upon timer mocks.
2020-09-09 09:52:03 +02:00
Alvaro Catalina d55ea0b0b4 feat: RegExp support for *ByTestId queries (#535)
* getAllByTestId supports a regex matcher

* update typings

* docs: update

* refactor types

* refactor. remove unnecessary try/catch

* refactor test assertions
2020-09-07 22:39:16 +02:00
Michał Pierzchała e0359c6650 fix: add note about baseElement removed from render (#533)
* fix: add note about baseElement removed from render

* typos, language
2020-09-03 14:30:59 +02:00
Justinas Reigis 327ccf6fb9 docs: update scroll event api for flat list (#519) 2020-08-31 10:07:58 +02:00