109 Commits

Author SHA1 Message Date
Youssouf EL AZIZI 74acd58137 docs: add config example for pnpm (#1400)
* Add config example for pnpm 

While using `pnpm` as package manger `transformIgnorePatterns` should refernce to package inside `.pnpm` folder.
[source](https://jestjs.io/docs/configuration#transformignorepatterns-arraystring)

* Update website/docs/ReactNavigation.md

---------

Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
2023-05-02 14:00:09 +02:00
Maciej Jastrzebski 7b02f510d6 chore: fix migration guide role prop naming (#1382) 2023-04-05 18:21:07 +02:00
Josh Justice 7eb1114dc9 Fix typo in "derived" in v12 migration guide (#1376) 2023-04-04 20:06:35 +02:00
Maciej Jastrzebski 4256d0c83c v12 release (#1314)
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
Co-authored-by: Pierre Zimmermann <64224599+pierrezimmermannbam@users.noreply.github.com>
2023-03-15 09:41:38 +01:00
Pierre Zimmermann 43e02e443a docs: update docs on custom jest preset (#1316)
* docs: update docs on custom jest preset

* docs: flip conditions on modern timers and react native version

* Update README.md

Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>

* Update title in readme for custom jest preset

Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>

---------

Co-authored-by: pierrezimmermann <pierrez@nam.tech>
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
2023-02-17 14:37:08 +01:00
Maciej Jastrzebski 47b125c195 refactor(breaking): rename container to UNSAFE_root; introduce root host element (#1298) 2023-02-14 00:32:51 +01:00
Maciej Jastrzebski 8bd19520bf chore: deprecate some a11y queries (#1226) 2023-01-28 22:31:56 +01:00
Patryk Fryda 0af721144f feat: check accessibilityLabelledBy in *ByLabelText queries (#1191)
* feat: check accessibilityLabelledBy in *ByLabelText queries

* refactor: move getNodeByText to matchTextContent helper

* test: improve getByLabelText tests

* refactor: extract matchLabelText

* refactor: tweaks

* refactor: code review changes

* refactor: code review changes

* chore: rebase on main

* chore: fix lint

* chore: fix test code in files

* chore: fix lint

* chore: fix ts error due to missing RN typing

Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
2023-01-23 23:52:24 +01:00
Pierre Zimmermann d261f6100e feat(breaking): Return host component for all queries (#1234)
* BREAKING CHANGE : make placeholdertext queries return host elements

* BREAKING CHANGE : make displayValue queries return host elements

* BREAKING CHANGE: make text queries return host elements

* refactor: reset config to default before each test

* feat: use component names from config and add api to configure them

* feat: remove legacy option from queries

* refactor: reorganize legacy and breaking tests for queries

* feat: change error messages for mismatching host component names

* fix: do not update screen when running auto detection

* fix: typo in comment

* refactor: use an object for matchTextContent params

* tests: rewrite some tests to match repo patterns

* fix: use legacy queries by default to prevent breaking changes

* fix: remove wrong uppercase in flow typings

* docs: remove section on useLegacy queries as it wont be a public api

* docs: small improvements based on review

* fix: remove typo in error message

* refactor: rename getReactNativeHostComponentNames to detectHostComponentNames

* refactor: use useBreakingChange from internal config instead of useLegacyQueries

* fix: use fake timers in test so it doesnt take too much time

* refactor: replace type assertions by real type checking

* fix: revert change due to rebase

* fix: improvements after review

* refactor: define type to match inside matchTextContent function

* refactor: rename function to get error message

* feat: display error when auto detect of host component names throw

* fix: remove unused ts-expect-error after ts version bump

* refactor: run auto detection on render if it hasnt been run yet

* refactor: reuse type imports that had been converted to regular ones

* refactor: add comments to distinguish breaking and legacy

* refactor: move config logic into detectComponentHostNames function

* refactor: rename function to detectComponentHostNamesIfNeeded

* tests: add test on detectHostComponentNamesIfNeeded

* fix: use host component name from config for textinput in fireEvent

* refactor: run autodetection in text, displayvalue and placeholder queries rather than in render

* refactor: remove useless async declaration

* refactor: improvements for readability from review

* Update src/__tests__/host-component-names.test.tsx

* refactor: declare variable for host component names in detection function

* refactor: rename detectHostComponentNamesIfNeeded to getHostComponentNames

* feat: use getHostComponentNames in fireEvent for textinput host name

* refactor: revert refactor on matchTextContent

* refactor: add comment to indicate impossible path

* chore: simplify jest-setup files

* refactor: code review changes

Co-authored-by: pierrezimmermann <pierrez@nam.tech>
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
2023-01-15 23:13:27 +01:00
Maciej Jastrzebski 71d5040697 chore: update examples to use toBeOnTheScreen() (#1267) 2023-01-03 17:52:31 +01:00
Maciej Jastrzebski aa92b77bbf fix: add deprecation notice for *ByA11yState and *ByA11yValue queries (#1269) 2023-01-03 11:15:08 +01:00
Maciej Jastrzebski 9ec12705e7 docs: improve findBy docs by adding information about screen.debug() (#1268) 2023-01-03 11:07:30 +01:00
Pierre Zimmermann ad125ea98c docs: rewrite documentation on waitFor (#1233)
Co-authored-by: pierrezimmermann <pierrez@nam.tech>
2022-12-06 22:13:18 +01:00
Maciej Jastrzebski 45302ea122 docs: use includeHiddenElements option name instead of hidden (#1246) 2022-12-01 16:32:02 +01:00
Maciej Jastrzebski 527ea62623 feat: *ByRole a11y value option (#1210) 2022-11-15 16:53:10 +01:00
Maciej Jastrzebski 87a715bd69 Update API.md
Fix link
2022-11-15 11:47:53 +01:00
MattAgn c9c0493903 Add alias to hidden in query options (#1220)
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
2022-11-15 11:18:03 +01:00
Maciej Jastrzebski 92cb031ad6 feat: alias isInaccessible as isHiddenFromAccessibility (#1211) 2022-11-08 11:17:21 +01:00
MattAgn 860356be06 feat: option for queries to respect accessibility (#1064)
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
2022-11-04 22:44:50 +01:00
Pierre Zimmermann a78f3e4134 feat: debug options (#1160)
Co-authored-by: pierrezimmermann <pierrez@nam.tech>
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
2022-11-03 12:52:51 +01:00
Maciej Jastrzebski bfb3498e39 docs: testing environment (#1195)
* docs: testing environment

* fix: links

* docs: link from FAQ

* Update TestingEnvironment.md

* Apply suggestions from code review

Co-authored-by: Pierre Zimmermann <64224599+pierrezimmermannbam@users.noreply.github.com>
Co-authored-by: Augustin Le Fèvre <augustin.le-fevre@klarna.com>

* docs: code review changes

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
Co-authored-by: Pierre Zimmermann <64224599+pierrezimmermannbam@users.noreply.github.com>
Co-authored-by: Augustin Le Fèvre <augustin.le-fevre@klarna.com>
2022-10-31 16:09:21 +01:00
Shaswat Prabhat 52222b42b4 Add queryOptions to labelText and hintText (#1193)
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
2022-10-31 12:10:45 +01:00
Maciej Jastrzebski bd5ddd7bc4 fix: *ByA11yState default value false value for busy, disabled & selected state (#1166) 2022-10-21 11:06:57 +02:00
Augustin Le Fèvre 7ae763ff65 Query by role and accessibilityState and improve ByRole query errors (#1161) 2022-10-20 11:52:10 +02:00
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