Commit Graph

8 Commits

Author SHA1 Message Date
Maciej Jastrzebski 17ccd9ea5a chore: cleanup legacy extend-expect from code and docs (#1739) 2025-01-22 16:36:10 +01:00
Maciej Jastrzebski 383c241d2e feat(v13): enable concurrent rendering by default (#1692)
* feat!: enable concurrent rendering by default

* chore: tweaks
2024-10-25 10:02:02 +02:00
Maciej Jastrzebski f231ea30b2 feat: option for enabling concurrent rendering (#1685) 2024-10-25 09:06:41 +02:00
Maciej Jastrzebski a60ce287e1 refactor: 0.76 stable tweaks (#1682) 2024-10-24 09:36:26 +02:00
Maciej Jastrzebski 0e8555066e chore: React Native 0.76 support (#1664) 2024-10-18 11:10:22 +02:00
Maciej Jastrzebski cae05837a8 chore: Jest snapshot pluging for strip ansi (#1455) 2023-08-16 14:11:48 +02:00
Stephen Hanson f7c8400246 feat: Render element tree in query error messages (#1378)
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
2023-04-27 11:05:10 +02: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