-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Add ability to fire gesture events in testing #1844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
97 commits
Select commit
Hold shift + click to select a range
fbb73fe
Set up for Jest
piaskowyk 22c989f
Removed Platform.OS mock
piaskowyk f701290
Remove some configs
piaskowyk 8bf842a
Tap, Pan, LongPress
piaskowyk 71ba707
Add test tags
j-piasecki cad2fa8
All events
piaskowyk 5315b70
Refactor part 1
piaskowyk 475e158
Refactor part 2
piaskowyk d924158
Recognise event tags
piaskowyk 0a8e305
Rename macro
piaskowyk 7c368a4
Fix lint
piaskowyk 300449d
Fix lint
piaskowyk f3a7da1
Fix lint - last time, rly
piaskowyk edac5a3
Rename withTestTag to withTestId
j-piasecki 942ee6a
Add jest registry
j-piasecki d727e9d
Rename methods
piaskowyk dbbe739
Remove rule
j-piasecki 60109b1
Nested handlers and removed raw events
piaskowyk dd8daca
Revrite tests
piaskowyk 6196551
Support for onGestureEvent
piaskowyk f052de1
Basic support for API v2
piaskowyk 6af729e
Lint
piaskowyk 9b8a469
Lint
piaskowyk f28aeed
Merge with https://github.com/j-piasecki/react-native-gesture-handler…
piaskowyk a04e874
New approach basic
piaskowyk 60dad67
Added suport for event config
piaskowyk 857565a
Added basic support for api v2
piaskowyk a405e49
Checkpoint
piaskowyk 47b9e1f
Move __tests__ to src/
jgonet a30b43f
Add jest types to tsconfig
jgonet 98b9d63
Add rule for custom expect functions
jgonet 82a0e45
WIP: new test API
jgonet 252e152
WIP: new approach to sending events, update testID type
jgonet e3b58df
Simplify HandlerStateChangeEventPayload type
jgonet e619c76
Extract handler names to constants
jgonet da2bf6b
Update Jest & TS config to not compile and run compiled tests
jgonet 11d3d6a
WIP: create correct event object for handler
jgonet 094f3e6
Tests for additional event data
jgonet fcfe3fa
Add defaults for event data tests
jgonet 256a6d1
Replace Reanimated 2 API with base RNGH one
jgonet 82e5028
Replace TwoHandlers with NestedHandlers
jgonet 086ecd6
Send gesture events only when oldState === state
jgonet 58be2b5
Remove casts in test
jgonet 9363218
Fill oldState for events
jgonet b96eb8e
Remove unnecessary comments
jgonet e08101d
Add stubs of next tests
jgonet 025da16
Add test for Reanimated 2 useAnimatedGestureHandler hook
jgonet 73391fe
Merge branch 'main' into @jgonet/jest-events
jgonet faee505
Remove Jest handler registry
jgonet 2587275
Don't show upgrade notice in tests
jgonet 9a2bb80
Register testIDs of v2 handlers
jgonet 2f061e9
Use beforeEach(cleanup)
jgonet 5f8f88f
Expose handlerTag in component props
jgonet 10dc914
Support v2 in fireGestureHandlerEvent
jgonet f5aa809
Remove unnecessary comments
jgonet dab60ef
Update v2 tests
jgonet 0baf954
Cleanup test comments
jgonet d1cfaee
Refactor fireGestureHandlerEvent
jgonet 7a550b8
Move withPrevAndCurrent to utils
jgonet a8cc18c
Add SingleHandler to v2 tests
jgonet 3161380
Implement fillMissingActiveStateFields
jgonet f08283c
Fix impl of withPrevAndCurrent
jgonet b3fea5e
Add tests for validator
jgonet f28cb39
Prototype ✨ magic ✨
jgonet 3f30889
Add error msgs to tests' expect assertion
jgonet a5ab697
Add test with additional data
jgonet 1cdd310
Export Jest utils
jgonet 4caa848
Remove unused import
jgonet f971105
Rename fireGestureHandlerEvent to fireGestureHandler
jgonet ad77bb6
Upgrade typescript to 4.5.5
jgonet e10efe5
Add tsconfig.build.json for release builds
jgonet 7c468a9
Upgrade eslint ts eslint plugins to 4.33.0
jgonet 0f36ca7
Throw when getByHandlerId can't find given handler
jgonet 166c0df
Remove unnecessary config keys
jgonet cca35ac
Remove unnecessary JSDoc
jgonet 4e1105c
Don't trigger all handlers when in Jest env
jgonet 0b089c0
Update component types in test
jgonet 4d3dd6d
Fix property check
jgonet 45f7d9e
Move isJest() to utils and rename it to isJestEnv()
jgonet d66672a
Merge branch 'main' into @jgonet/jest-events
jgonet 97029a4
Add test for FAILED and CANCELLED last state
jgonet a173d14
Remove proto magic
jgonet fe60bcd
Accept generic type in fireGestureHandler
jgonet db2f0c5
Rename interface
jgonet e7518d1
Rename getByHandlerId to getByGestureId
jgonet 991d044
Split tests into categories
jgonet d059fa9
Merge branch 'main' into @jgonet/jest-events
jgonet 9bc3bd6
WIP: Docs
jgonet f449de3
Add defaults to event list
jgonet 24d32bd
Simplify shouldConsumeEvent
jgonet 0dde54a
Fill first and last events
jgonet 4dec5fc
Add two last tests
jgonet 390c59a
Add additional tests for filling events
jgonet 9ef4bf7
Rename getByGestureId to getByGestureTestId
jgonet 7bc1fa6
Add partial docs
jgonet 6e982d2
Use correct generic type, update function name in docs
jgonet e33c534
Lint
jgonet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Implement fillMissingActiveStateFields
- Loading branch information
commit 316138029ee21eebd45746248ccfff32f8b652bb
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.