-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[E2E] Add Detox tests #4182
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
Open
m-bert
wants to merge
112
commits into
main
Choose a base branch
from
@mbert/e2e
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[E2E] Add Detox tests #4182
Changes from all commits
Commits
Show all changes
112 commits
Select commit
Hold shift + click to select a range
5736594
updated pan gesture view and pan gesture example to use v3 api
f201788
removed videos and migarted examples in all gesture pages
8598093
not using the GestureBasicSrc files other than for legacy and simplif…
6e2f843
fixed pinch gesture example
3eb98c2
updated legacy a
47a9943
fixed the incosistent size of pan gesture example compared to other
5cbf50d
Merge branch 'main' of github.com:software-mansion/react-native-gestu…
relextm19 976cc4a
Merge branch 'main' of github.com:software-mansion/react-native-gestu…
relextm19 1dee9e3
inital strcuture almost
relextm19 6aa5a1d
runs :)
relextm19 9cca906
now it works :)
relextm19 333b150
added navigation
relextm19 e7aee69
works on debug doesnt work on release :|
relextm19 2b7a505
most tests run
relextm19 5eb6e46
fixed pan and fling isses
relextm19 1091fc7
added e2eApp
relextm19 609cb9f
doesnt realy work
relextm19 ffbe065
Merge main
relextm19 ee7e34a
updated version and tests
relextm19 25a9fd8
updated fling tests
relextm19 baf0531
navigation works
relextm19 aae4472
added a section for composition and interaction
relextm19 c287b32
added a screen for compteing gestures
relextm19 3ad73ff
added test for exclusive gestrure
relextm19 1b49237
added indicators for tests
relextm19 7c09199
added gesture detector tests
relextm19 1560c17
added ci for e2e tests
relextm19 0770390
test
relextm19 d00dad9
test
relextm19 f823ff4
test
relextm19 ab5e5bd
test
relextm19 e7876c7
switch to npx for detox and install dependecies with brew
relextm19 d936e3f
changed the iphone sim version
relextm19 39f5ab7
switched sim to ipohone 15
relextm19 591093a
test
relextm19 2b365bb
configured detox for android
relextm19 3e6846f
made the pinch test platfrom specific
relextm19 e9fc47e
split the tests by platform
relextm19 d91edf3
added rotation gesture tests with argent
relextm19 6d7ed9c
changed argent to npx argent for github actions
relextm19 4d37b67
added a cache for the e2eApp build
relextm19 faffbc5
removed npx detox form the github action
relextm19 bbcca42
now cache pods instead of the full build
relextm19 0d98a08
added partial cache for the ios build
relextm19 5524682
fixed the yarn test command and added an android-e2e action
relextm19 7b8a610
allowed the jobs to run in pararell
relextm19 6338f20
updated the workfolow for android
relextm19 6287097
updated argent usage on the runner
relextm19 8a7e559
changed the argent install command
relextm19 ae5642e
udpate argent install command:)|
relextm19 e533c90
update exclusiove handler test and bump macos version on github runner
relextm19 3ab3b9a
udpate xcode version for runner
relextm19 8fb7380
idk
relextm19 f34abbb
update the macos vestrions for runners|
relextm19 0de69dc
updated worklet and react-native versions
relextm19 6fe8a09
updated rotation argent handler
relextm19 f285710
changed from release to debug on ci
relextm19 e678d8f
changed back to release
relextm19 362027c
split launching the emulator into two steps in the android config
relextm19 445a1a8
merge main
relextm19 3cae15b
added adv cache for android
relextm19 5898b0b
fixed argent output resolution
relextm19 151850c
added a pan distance test
relextm19 104a1e9
cleared up the error message for panDistance test
relextm19 24b8849
changed argent usage
relextm19 46f6064
changed andorid emulator
relextm19 42428a9
changed to iphone 15
relextm19 4f45ac9
test argent
relextm19 887af6b
update macos on runners and change argent usage
relextm19 d39cf88
changed xcode version on runenr
relextm19 21dcd7e
changed xcode version on runenr
relextm19 4be1e52
udpate detox to iphone 17
relextm19 9970cb9
removed the cache from android tests
relextm19 357d0ce
removed the cache from android tests
relextm19 6a52bb0
Merge branch 'main' into @mbert/e2e
m-bert eff43f2
Tap test in expo-example
m-bert 0320633
Do not reset app
m-bert f489bda
Remove old pager
m-bert 834a02e
Setup android
m-bert 0550e57
Undo some unnecessary changes
m-bert 3b41658
Undo other changes
m-bert 3d4fd05
Versions
m-bert 3bd9660
Docs changes
m-bert ee2f30a
newlines
m-bert 233fa37
Bump expo
m-bert 6d77004
CI workflow
m-bert cf31400
Update xcode on CI
m-bert f2d6ab8
Fix lint CI
m-bert 03c16ef
Remove unused navigation
m-bert fe35008
Merge branch 'main' into @mbert/e2e
m-bert bdaa7d3
Remove .agents
m-bert fbfe639
locks
m-bert 89ea6ce
Pan Test
m-bert a1794e7
Leave only pan test
m-bert d27b482
Update CI script
m-bert 770ba5e
Change android runner to ubuntu
m-bert 5ea8873
Bump expo to stable 56
m-bert 30bf81d
Merge branch 'main' into @mbert/e2e
m-bert 253cb97
Add missing dependency
m-bert 92cb7ae
Another CI update
m-bert ad016d4
Merge branch 'main' into @mbert/e2e
m-bert d14b179
Update setup-detox-script
m-bert bdad877
Update CI file
m-bert 73ce94b
New line
m-bert d903abc
Format
m-bert 6aa4d7c
Remove new-app-screen
m-bert c51e035
Potential fix for pull request finding
m-bert 05666dc
Potential fix for pull request finding
m-bert 656b073
Ramove native-stack
m-bert 32aa50f
Merge branch '@mbert/e2e' of github.com:software-mansion/react-native…
m-bert 6a2102d
Run E2E CI when modifying e2e paths
m-bert 9687289
Merge branch 'main' into @mbert/e2e
m-bert 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| name: E2E Test | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - apps/expo-example/e2e/** | ||
| - apps/common-app/src/e2e_screens/** | ||
| push: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: e2e-app-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| ios-e2e: | ||
| if: github.repository == 'software-mansion/react-native-gesture-handler' | ||
| runs-on: macos-26 | ||
| env: | ||
| WORKING_DIRECTORY: apps/expo-example | ||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Use node 24 | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
| cache: yarn | ||
|
|
||
| - name: Use latest stable Xcode | ||
| uses: maxim-lobanov/setup-xcode@v1 | ||
| with: | ||
| xcode-version: '26.4.1' | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn --immutable | ||
|
|
||
| - name: Setup Detox | ||
| run: brew tap wix/brew && brew install applesimutils && npm install -g detox-cli | ||
|
|
||
| - name: Build for iOS | ||
| working-directory: ${{ env.WORKING_DIRECTORY }} | ||
| run: yarn build-detox-ios | ||
|
|
||
| - name: Run tests on iOS | ||
| working-directory: ${{ env.WORKING_DIRECTORY }} | ||
| run: yarn test:ios | ||
|
|
||
| android-e2e: | ||
| if: github.repository == 'software-mansion/react-native-gesture-handler' | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| WORKING_DIRECTORY: apps/expo-example | ||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Use node 24 | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
| cache: yarn | ||
|
|
||
| - name: Install emulator system dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y libpulse0 | ||
|
|
||
| - name: Enable KVM | ||
| run: | | ||
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
| sudo udevadm control --reload-rules | ||
| sudo udevadm trigger --name-match=kvm | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn --immutable | ||
|
|
||
| - name: Setup Detox | ||
| run: npm install -g detox-cli | ||
|
|
||
| - name: Build for Android | ||
| working-directory: ${{ env.WORKING_DIRECTORY }} | ||
| run: yarn build-detox-android | ||
|
|
||
| - name: Run tests on Android | ||
| uses: reactivecircus/android-emulator-runner@v2 | ||
| with: | ||
| api-level: 33 | ||
| arch: x86_64 | ||
| force-avd-creation: true | ||
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
| disable-animations: true | ||
| avd-name: Pixel_9 | ||
| working-directory: ${{ env.WORKING_DIRECTORY }} | ||
| script: adb devices && yarn test:android | ||
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| import { useState } from 'react'; | ||
| import { Pressable, StyleSheet, Text, View } from 'react-native'; | ||
| import { | ||
| GestureDetector, | ||
| ScrollView, | ||
| usePanGesture, | ||
| } from 'react-native-gesture-handler'; | ||
|
|
||
| export default function PanScreen() { | ||
| const [text, setText] = useState(''); | ||
|
|
||
| const panGesture = usePanGesture({ | ||
| onBegin: () => { | ||
| setText((prev) => prev + '1'); | ||
| }, | ||
| onActivate: () => { | ||
| setText((prev) => prev + '2'); | ||
| }, | ||
| onUpdate: () => { | ||
| setText((prev) => { | ||
| // Skip subsequent updates | ||
| if (prev[prev.length - 1] === '3') { | ||
| return prev; | ||
| } | ||
| return prev + '3'; | ||
| }); | ||
| }, | ||
| onDeactivate: () => { | ||
| setText((prev) => prev + '4'); | ||
| }, | ||
| onFinalize: () => { | ||
| setText((prev) => prev + '5'); | ||
| }, | ||
| runOnJS: true, | ||
| }); | ||
|
|
||
| return ( | ||
| <View style={styles.container}> | ||
| <ScrollView style={styles.scrollContainer}> | ||
| <Text testID="state-indicator" style={styles.stateIndicator}> | ||
| {text} | ||
| </Text> | ||
| </ScrollView> | ||
| <View testID="container" style={styles.innerContainer}> | ||
| <GestureDetector gesture={panGesture}> | ||
| <View style={styles.gestureBox} testID="pan-box" /> | ||
| </GestureDetector> | ||
| </View> | ||
| <View style={styles.buttonContainer}> | ||
| <Pressable | ||
| testID="reset" | ||
| style={styles.resetButton} | ||
| onPress={() => { | ||
| setText(''); | ||
| }}> | ||
| <Text>Reset</Text> | ||
| </Pressable> | ||
| </View> | ||
| </View> | ||
| ); | ||
| } | ||
|
|
||
| const styles = StyleSheet.create({ | ||
| container: { | ||
| flex: 1, | ||
| }, | ||
| scrollContainer: { | ||
| height: 50, | ||
| maxHeight: 50, | ||
| }, | ||
| innerContainer: { | ||
| flex: 1, | ||
| justifyContent: 'space-around', | ||
| alignItems: 'center', | ||
| }, | ||
| stateIndicator: { | ||
| fontSize: 15, | ||
| alignSelf: 'flex-start', | ||
| }, | ||
| gestureBox: { | ||
| width: 120, | ||
| height: 120, | ||
| borderRadius: 20, | ||
| backgroundColor: '#4ecdc4', | ||
| }, | ||
| buttonContainer: { | ||
| height: 60, | ||
| maxHeight: 60, | ||
| alignItems: 'center', | ||
| justifyContent: 'center', | ||
| }, | ||
| resetButton: { | ||
| width: 120, | ||
| height: 40, | ||
| borderRadius: 20, | ||
| backgroundColor: 'royalblue', | ||
|
|
||
| justifyContent: 'center', | ||
| alignItems: 'center', | ||
| }, | ||
| }); |
4 changes: 2 additions & 2 deletions
4
apps/common-app/src/legacy/basic/pagerAndDrawer/index.android.tsx
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
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
Oops, something went wrong.
Oops, something went wrong.
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.