167 Commits

Author SHA1 Message Date
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 3739c89d32 chore: upgrade docusaurus 2.3.1 (#1336)
* chore: upgrade docusaurus
* chore: upgrade website react
2023-02-17 12:37:46 +01:00
renovate[bot] 4487b62e1b chore(deps): update node.js to v8.17.0 (#1326)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-16 12:20:45 +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
dependabot[bot] 15e2db7869 chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 in /website (#1303)
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-08 11:49:34 +01:00
Maciej Jastrzebski 8bd19520bf chore: deprecate some a11y queries (#1226) 2023-01-28 22:31:56 +01:00
dependabot[bot] b6b31a2a66 chore(deps): bump ua-parser-js from 0.7.31 to 0.7.33 in /website (#1294)
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.31 to 0.7.33.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.31...0.7.33)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-26 11:58:18 +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
Maciej Jastrzebski 9019eed3d1 chore: deploy website to GH pages (#1282)
* chore: deploy website to gh pages

* chore: fix deploy script

* chore: fix deploy script

* chore: tweaks

* chore: tweaks
2023-01-19 10:34:13 +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
dependabot[bot] 0467479fbe chore(deps): bump json5 from 2.2.1 to 2.2.2 in /website (#1266)
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-30 10:46:43 +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
dependabot[bot] fa34289cf8 chore(deps): bump loader-utils from 2.0.3 to 2.0.4 in /website (#1227)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.3...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-16 10:34:06 +01:00
Maciej Jastrzebski 527ea62623 feat: *ByRole a11y value option (#1210) 2022-11-15 16:53:10 +01:00
dependabot[bot] e3a76cae35 chore(deps): bump loader-utils from 2.0.0 to 2.0.3 in /website (#1217)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.0 to 2.0.3.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.3/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.0...v2.0.3)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 16:14:00 +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
dependabot[bot] 6cd87b9c3a chore(deps): bump ansi-regex from 4.1.0 to 4.1.1 in /website (#1102)
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-08 17:43:05 +02:00
Michał Pierzchała db3b432abf chore: update algolia crowler 2022-09-07 21:45:23 +02:00
Michał Pierzchała a764e2be5d chore: update algolia keys 2022-08-26 16:56:33 +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
dependabot[bot] 4bd957458d chore(deps): bump browserslist from 4.14.0 to 4.21.3 in /website (#1053) 2022-08-09 19:29:15 +02:00
dependabot[bot] a8f02d7382 chore(deps): bump normalize-url from 4.5.0 to 4.5.1 in /website (#1052) 2022-08-09 19:01:45 +02:00
Oskar Kwaśniewski 3fb18c0884 chore: upgrade docusaurus to v2.0.1 (#1049)
* chore: upgrade docusaurus to v2.0.1

* fix: change docker image to node 16

* fix: update node version to 16.15

* fix: bump node docker image to current
2022-08-09 18:02:37 +02:00
dependabot[bot] c914aa85c4 chore(deps): bump eventsource from 1.0.7 to 1.1.1 in /website (#985)
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.0.7 to 1.1.1.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.0.7...v1.1.1)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-09 10:33:31 +02:00
dependabot[bot] 6ba1d382e8 chore(deps): bump terser from 4.6.13 to 4.8.1 in /website (#1016)
Bumps [terser](https://github.com/terser/terser) from 4.6.13 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-09 10:08:40 +02:00
dependabot[bot] 41b1f0f0ee chore(deps): bump async from 2.6.3 to 2.6.4 in /website (#961) 2022-08-08 16:18:51 +02:00
Maciej Jastrzebski 14dba849d7 docs: v11 migration changelog link (#1023) 2022-07-25 18:13:19 +02:00