Maciej Jastrzebski
371534b8f7
docs: improve api docs ( #1535 )
...
* docs: improve query docs
* docs: tweaks
2024-03-12 22:26:08 +01:00
Maciej Jastrzebski
bab4097836
chore: update deps 2024-03-12 ( #1570 )
...
* chore: update 1
* chore: update @types/*
* chore: update react native
* chore: update eslint & typescript
* chore: fix lint
* chore: upgrade release it
* chore: reformat
* chore: disable flow validation
2024-03-12 11:37:06 +01:00
Steve Galili
4e148bdb05
chore: tweak docs and examples to match recommended practices 2024 (use screen object for queries) ( #1561 )
...
* chore: tweak docs and examples to match modern usage of lib.
Use screen object for queries (pt.1)
Use screen object for queries (pt.2)
update render docs to modern screen API and fix lint
* refactor: code review tweaks
---------
Co-authored-by: Maciej Jastrzębski <mdjastrzebski@gmail.com >
2024-03-11 22:46:07 +01:00
Dony Sukardi
4c6ec4f1fc
fix typo in UserEvent.md ( #1569 )
2024-03-10 17:17:29 +01:00
Maciej Jastrzebski
a282d1ecdd
Update CommunityResources.md
2024-01-26 16:21:08 +00:00
Maciej Jastrzebski
67fb7177cf
docs: update community resources ( #1558 )
...
* docs: update community resources
* docs: fix typos
2024-01-26 15:42:28 +00:00
Steve Galili
3e2060d89f
docs: add note user.scrollTo in favour of fireEvent.scroll and edit broken links ( #1551 )
...
* add note user.scrollTo in favour of fireEvent.scroll and edit broken links
* Update website/docs/API.md
---------
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com >
2024-01-10 13:07:59 +01:00
Maciej Jastrzebski
b222792320
chore: upgrade docusaurus ( #1552 )
...
* chore: upgrade docusaurus
* chore: improve color constrast on website in light mode
2024-01-05 13:17:42 +01:00
Maciej Jastrzebski
21254b059a
chore: reformat source using prettier ( #1550 )
...
* chore: reformat source using prettier
* chore: fix lint
2024-01-03 22:31:12 +01:00
Maciej Jastrzebski
78994129f8
docs: updates to docs ( #1547 )
...
* docs: update TestingEnv doc
* docs: update Contributing.md
* docs: update UserEvent.md
* docs: remove tocs
* docs: remove no-longer working FlatList examples for `fireEvent.scroll()`
2024-01-03 22:10:17 +01:00
Maciej Jastrzebski
464e986350
docs: jsdoc for Jest matchers ( #1548 )
...
* docs: add jsdocs for jest matchers
* docs: fix formatting issues
* docs: tweaks
2023-12-27 14:13:10 +01:00
Jakub Piasecki
edf52b625a
Add option to pass contentSize and layoutMeasurement when calling scrollTo ( #1543 )
...
* Add option to pass `contentSize` and `layoutMeasurement` when calling `scrollTo`
* Update docs
* Add tests
* refactor: code review changes
* refactor: code review changes
* refactor: code review changes
* docs: fix typo
---------
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com >
2023-12-15 18:32:08 +01:00
Maciej Jastrzebski
d003cd57ab
docs: remove beta status for User Event ( #1532 )
2023-11-27 23:37:01 +01:00
Maciej Jastrzebski
8a48e5ba59
docs: rewrite How should I query? guide ( #1531 )
...
* docs: describe query variants
* docs: tweaks
* docs: tweaks
* docs: more content
* docs: tweaks
* docs: tweaks
* docs: tweaks
* docs: update caniuse
* docs: tweaks
* docs: tweaks
* docs: tweaks
* docs: tweaks
2023-11-27 19:03:09 +01:00
Maciej Jastrzebski
ab679c9075
docs: spell-check the docs ( #1529 )
2023-11-15 22:35:25 +01:00
Maciej Jastrzebski
2bce396a46
docs: expose jest matchers publically (docs, examples, etc) ( #1523 )
...
* docs: update references to Jest Native
* chore: update docs
* chore: update example apps
* docs: update
* chore: upgrade example apps
* chore: self code review
* chore: docs tweaks
* docs: code review changes
2023-11-14 12:23:24 +01:00
Maciej Jastrzebski
80e64cff56
chore: enable Yarn 4 on CI ( #1525 )
...
* chore: enable Yarn 4 on CI (attempt 1)
* chore: attempt 2
* chore: attempt 3
* chore: attempt 4
* chore: attempt 5
* chore: fix website
* chore: fix attempt 6'
2023-11-13 17:29:36 +01:00
Maciej Jastrzebski
817d4edb75
chore: modern yarn (4.0) ( #1517 )
...
* chore: upgrade to Yarn 4
* chore: upgrade examples/basic
* chore: add git ignores
* chore: upgrade website yarn
* chore: fix yarn scripts
* chore: git ignore tweaks
* chore: git ignore tweaks
2023-11-13 14:16:47 +01:00
Maciej Jastrzebski
84ba56e56f
docs: Jest matchers docs ( #1506 )
...
* docs: v1 of jest matchers docs
* chore: add TOC
* chore: tweak heading levels
* docs: tweaks
* docs: cross references
* docs: tweaks
* docs: tweaks
* docs: tweaks
* Update website/docs/JestMatchers.md
Co-authored-by: Pierre Zimmermann <64224599+pierrezimmermannbam@users.noreply.github.com >
* Update website/docs/JestMatchers.md
Co-authored-by: Pierre Zimmermann <64224599+pierrezimmermannbam@users.noreply.github.com >
* Update website/docs/JestMatchers.md
Co-authored-by: Pierre Zimmermann <64224599+pierrezimmermannbam@users.noreply.github.com >
* Update website/docs/JestMatchers.md
Co-authored-by: Pierre Zimmermann <64224599+pierrezimmermannbam@users.noreply.github.com >
* Update website/docs/JestMatchers.md
Co-authored-by: Pierre Zimmermann <64224599+pierrezimmermannbam@users.noreply.github.com >
* Update website/docs/JestMatchers.md
Co-authored-by: Pierre Zimmermann <64224599+pierrezimmermannbam@users.noreply.github.com >
* Update website/docs/MigrationJestMatchers.md
Co-authored-by: Pierre Zimmermann <64224599+pierrezimmermannbam@users.noreply.github.com >
* Update website/docs/MigrationJestMatchers.md
Co-authored-by: Pierre Zimmermann <64224599+pierrezimmermannbam@users.noreply.github.com >
* docs: spellchecking
* chore: final fixes
---------
Co-authored-by: Pierre Zimmermann <64224599+pierrezimmermannbam@users.noreply.github.com >
2023-11-09 17:10:50 +01:00
Maciej Jastrzebski
d36137bcd1
docs: troubleshooting undefined components ( #1502 )
2023-09-19 11:16:04 +02:00
Andrew
f538029201
docs: note required RNTL version for user-event in user-event.md ( #1494 )
...
* docs: note required RNTL version for user-event in user-event.md
* chore: tweak wording
* chore: tweak
* chore: tweaks
---------
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com >
2023-09-18 22:13:55 +02:00
Nick McCurdy
a0160620da
Upgrade Node for security ( #1498 )
2023-09-15 22:39:11 +02:00
Wiktor Sieprawski
a7ea95d3d7
feat: user event scroll ( #1445 )
...
* feat: setup dummy scroll endpoint
* chore: use ScrollEventBuilder
* chore: enhance API endpoint with parameters
* chore: emit multiple scroll events
* fix: intermediate steps offset values
* feat: momentum scroll
* chore: add scroll to userEvent
* feat: scrollToTop
* feat: remember scroll position for element
* fix: setting and getting scroll state
* chore: validate host component type
* chore: validate and emit intermediate callbacks in scrollToTop
* chore: fix ts
* refactor: rename scroll to scrollTo
* refactor: y & x scrollTo params
* refactor: refactor y, x params to support explicit steps
* chore: fix typecheck
* refactor: improve typing
* refactor: momentumY, momentumX options
* docs: initial docs for `scrollTo`
* refactor: descope `scrollToTop` variant
* docs: tweaks
* refactor: improve TS typing by separating vertical/horizontal scroll
* refactor: wrap scroll event in nativeEvent wrapper
* refactor: clean up implementation
* chore: add FlatList tests
* refactor: remove explicit steps
* refactor: introduce inertial interpolator for momentum scroll
* docs: update docs
* chore: update snapshots
* refactor: code review changes
* feat: validate scroll direction
* docs: tweaks
* docs: tweak
* refactor: add more tests to improve code cov
* refactor: improve errors
* refactor: code review tweaks
* refactor: add wait calls
* refactor: tweaks, tweaks, tweaks
* refactor: final tweaks
---------
Co-authored-by: Maciej Jastrzębski <mdjastrzebski@gmail.com >
2023-09-13 12:05:56 +02:00
Maciej Jastrzebski
3fa6c457ea
feat: aria-value* props support ( #1480 )
...
* feat: aria-value* props support
* refactor: tweaks
* chore: fix code cov
2023-09-06 17:16:21 +02:00
Maciej Jastrzebski
5dbd04f4be
feat: aria-modal support ( #1481 )
...
* feat: `aria-modal` support
* chore: add API assumptions tests
2023-09-06 12:37:08 +02:00
Maciej Jastrzebski
3ff0afb119
docs: setup automatic table of contents ( #1482 )
...
* docs: automate table of contents for all pages
* docs: custom anchors
* docs: tweaks
2023-08-31 22:33:03 +02:00
Maciej Jastrzebski
5cbe69af07
feat: accessibility state ( #1478 )
...
chore: add tests, update docs
2023-08-31 15:33:41 +02:00
Maciej Jastrzebski
da0a888df7
feat: support aria-label and aria-labelledby props ( #1475 )
...
* feat: support aria-label and aria-labelledby props
* refactor: tweaks
* chore: revert unintended docs changes
2023-08-31 15:29:38 +02:00
Maciej Jastrzebski
054f36d158
feat: support role prop ( #1476 )
2023-08-31 15:23:00 +02:00
Maciej Jastrzebski
238c860088
feat: support aria-hidden prop ( #1474 )
2023-08-31 15:17:51 +02:00
Frieder Bluemle
a7f250d930
Fix changelog commit range in v12 migration guide ( #1470 )
2023-08-24 09:52:28 +02:00
Matthew Tilley
89874141c2
Update GettingStarted.md ( #1460 )
2023-08-19 12:36:43 +02:00
Maciej Jastrzebski
62a9b570fc
feature: userEvent clear() ( #1440 )
...
* feat: implement clear()
* chore: add docs
* chore: fix lint
* refactor: remove redundant clearAllMocks
* feat: throw on disabled element
* refactor: tweak errors
* refactor: cleanup
* refactor: remove error on disabled element
2023-08-10 22:35:00 +02:00
Maciej Jastrzebski
fd08a4cd2d
chore: update docs ( #1448 )
2023-08-10 13:15:42 +02:00
Maciej Jastrzebski
3382867b13
chore: expose User Event in the exports and website ( #1410 )
...
* chore: expose User Event in the exports and website
* docs: tweaks, add beta notice
* chore: anotate fireEvent api
* docs: tweaks
2023-08-04 12:28:28 +02:00
Maciej Jastrzebski
574205aa93
feat: User Event type() ( #1396 )
...
* feat: userEvent type()
chore: restore tests
chore: more tests
chore: improve coverage
chore: moar tests
docs: improve the docs
chore: fix lint
refactor: code review changes
chore: fix lint
chore: tweak return type
refactor: flush microtasks after event
refactor: re-organize waits
refactor: improve dispatch event functions
refactor: remove flushMicroTasks calls
* chore: update snapshots
* chore: do not expose User Event docs yet
* refactor: simplify dispatchEvent code
* refactor: press
* refactor: move warn method up
* refactor: finishing touches
* docs: correct typos
2023-07-24 11:53:09 +02:00
Pierre Zimmermann
1f381772ca
feat: userEvent.press ( #1386 )
...
* feat: create first version of userEvent.press
* feat: do not trigger press event when pointer events is disabled
* feat: make press events bubble up when trigerring a non touch responder
* tests: add test cases for userevent.press to check calls to onPressIn and onPressOut
* refactor: move userEvent.press tests in a dedicated test file
* feat: add pressDuration option for userEvent.press
* refactor: group test that check prop calls
* feat: add support for touchable opacity for userevent press
* feat: add support for Text
* feat: add support for TextInput for userEvent.press
* refactor: add some comments to explain pointer events api
* refactor: change the api of userEvent.press to make it async
* feat: add support for real timers for userEvent.press
* refactor: create a longPress api and remove duration option from press api
* feat: add warning for users when userEvent is used with real timers
* refactor: rewrite press using common user event code
* refactor: remove duplicate pointerEventEnabled method
* refactor: remove check on fake timers in user.press
* refactor: change order of functions in press file to have exports first
* feat: add delay before press
* feat: wait min press duration before calling onPressout for text and textInput
* chore: improve coverage
* feat: account for press duration when waiting for press out
* fix: wait for press duration also when pressing text or textinput
* docs: add documentation on press and longpress
* fix: check pointer events for Text and TextInput
* chore: fixes and tweaks on userEvent docs
* Update press doc based on review suggestion
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com >
* refactor: rename pressDuration option to duration
* Update longPress doc based on review suggestion
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com >
* refactor: use ts doc for isPointerEventsEnabled method
* refactor: rename file isPointerEventsEnabled to pointer-events
* refactor: split test in longPress in two
* refactor: use Date.now instead of new Date().getTime()
* refactor: also test payload of events for press and longpress
* refactor: fix typo in some longpress test names
* Update src/user-event/press/utils/warnAboutRealTimers.ts
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com >
* refactor: merge press and touch events
* fix: return after pressing text or textinput
* refactor: extract functions to trigger press on text/textInput
* refactor: use optional chaining
* feat: update warning when using userEvent with real timers
* refactor: check on press test that longPress is not called
* refactor: test directly warnings logged with real timers without mocking function
---------
Co-authored-by: pierrezimmermann <pierrez@nam.tech >
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com >
2023-07-17 17:27:42 +02:00
Maciej Jastrzebski
8c22290fd2
Update GettingStarted.md
2023-05-10 12:18:57 +02:00
Maciej Jastrzebski
dab444d6dd
feat: User Event core code ( #1405 )
...
* chore: extract user event common parts
* chore: stub press/type implementations
* chore: add sample tests
* refactor: tweaks
* chore: improve test coverage
* chore: more sample tests
* refactor: remove Date.now touch event timestamp
* chore: hide new docs from website
* feat: expose direct access
2023-05-10 10:33:00 +02:00
Josh Justice
9906ab743f
Fix a11y typo ( #1408 )
...
* Fix a11y typo
* Add missing (deprecated)
2023-05-09 12:04:00 +02:00
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
Stephen Hanson
4ac2833ae6
fix: docs link to GitHub ( #1390 )
2023-04-21 21:44:10 +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
renovate[bot]
7628005b7e
fix(deps): update all minor & patch deps ( #1363 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-15 18:57:38 +01: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
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