Skip to content
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

fix: change default gesture from Tap to Fling, fix failing CI #2023

Merged
merged 39 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
624fd2c
Update detox to 20.17.0, change default gesture from Tap to Manual
tboba Jan 31, 2024
a0c53b7
Change simulating scroll of events
tboba Jan 31, 2024
49b165f
Update api-level, change runs-on to macos-14
tboba Jan 31, 2024
3a9b85f
Change profile from pixel-2 to pixel_7
tboba Feb 1, 2024
92bfb9a
Revert changing workflow parameters
tboba Feb 1, 2024
93d3532
Revert changing workflow parameters, revert changing emulators
tboba Feb 1, 2024
3964112
Revert changing configuration, change os, enable kvm
tboba Feb 1, 2024
3f5dbc5
Change emulator name
tboba Feb 1, 2024
de6e1ef
Decrease disk size to 4gb
tboba Feb 1, 2024
7652461
Add temporary command for listing all packages
tboba Feb 1, 2024
7f5d45c
Revert adding adb
tboba Feb 5, 2024
a50f2d6
Add soloader to dependencies
tboba Feb 5, 2024
9bc234d
Move back to macos-12
tboba Feb 5, 2024
ae03f20
Change assembleAndroidTest to assembleRelease only
tboba Feb 5, 2024
c6f0b18
Add missing &&
tboba Feb 5, 2024
8d335a0
Revert removing assembleAndroidTest, change macos-12 to macos-14
tboba Feb 5, 2024
07e3988
Change macos-12 to macos-14
tboba Feb 5, 2024
4c442f6
Change arch
tboba Feb 5, 2024
a8fedc0
Change phone
tboba Feb 5, 2024
5a086ed
Add detox as compiling dependency
tboba Feb 5, 2024
982deac
Remove duplicated detox declaration
tboba Feb 5, 2024
bc29ec3
Temporarily revert configuration of emulator
tboba Feb 5, 2024
0d21bad
Add additional artifacts
tboba Feb 5, 2024
9972f8b
Change arch of pixel_2
tboba Feb 6, 2024
48d9581
Change macos-12 to macos-14 (again)
tboba Feb 6, 2024
0732823
Adjust emulator settings
tboba Feb 6, 2024
6986599
Disable building app, add options to emulator
tboba Feb 6, 2024
98a7e61
Change phone to pixel_6
tboba Feb 6, 2024
a18c1b0
Check if running emulator works on ubuntu
tboba Feb 6, 2024
7eb3ff8
Add to gradle.properties other RN architectures, revert android-e2e-t…
tboba Feb 6, 2024
4348d09
Add build steps
tboba Feb 6, 2024
35d35ca
Change the way of selecting architecture
tboba Feb 6, 2024
b1b0c6d
Change runner to ubuntu-latest
tboba Feb 6, 2024
3471b23
Lower available space to 2G
tboba Feb 6, 2024
9ee05ab
Lower disk space, revert target, remove garbage
tboba Feb 6, 2024
fe96593
Move from macos-12 to macos-14 in ios e2e tests
tboba Feb 6, 2024
9f27712
Revert to default settings
tboba Feb 6, 2024
2a0de84
Change name to e2e_emulator, truly change to default settings
tboba Feb 6, 2024
f823551
Change gesture from manual to fling
tboba Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/android-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn build-e2e-android
- name: Run emulator and tests
uses: reactivecircus/android-emulator-runner@v2.28.0
uses: reactivecircus/android-emulator-runner@v2
with:
working-directory: ${{ env.WORKING_DIRECTORY }}
api-level: 31
Expand All @@ -59,5 +59,5 @@ jobs:
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: android-fail-screen-shoots
name: android-fail-screen-shots
path: ${{ env.WORKING_DIRECTORY }}/artifacts
2 changes: 1 addition & 1 deletion .github/workflows/ios-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ jobs:
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: ios-fail-screen-shoots
name: ios-fail-screen-shots
path: ${{ env.WORKING_DIRECTORY }}/artifacts
4 changes: 2 additions & 2 deletions Example/.detoxrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ module.exports = {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',
build:
'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..',
'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug -PreactNativeArchitectures=x86_64 && cd ..',
reversePorts: [8081],
},
'android.release': {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/release/app-release.apk',
build:
'cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ..',
'cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release -PreactNativeArchitectures=x86_64 && cd ..',
},
},
devices: {
Expand Down
2 changes: 1 addition & 1 deletion Example/e2e/examplesTests/events.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('Events', () => {
await waitFor(element(by.id('root-screen-playground-Events')))
.toBeVisible()
.whileElement(by.id('root-screen-examples-scrollview'))
.scroll(200, 'down');
.scroll(100, 'down', NaN, 0.85);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for changing this value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that on higher Android APIs with gestures as a device navigation, phone can accidentally go into the preview of apps in the background - that's why I've added the offset here

});

it('should Events playground exist', async () => {
Expand Down
2 changes: 1 addition & 1 deletion Example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@types/react-native-restart": "^0.0.0",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.3.1",
"detox": "^20.11.4",
"detox": "^20.17.0",
"eslint": "^8.19.0",
"glob-to-regexp": "^0.4.1",
"jest": "^29.3.1",
Expand Down
61 changes: 54 additions & 7 deletions Example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,11 @@
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.48.0.tgz#642633964e217905436033a2bd08bf322849b7fb"
integrity sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==

"@flatten-js/interval-tree@^1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@flatten-js/interval-tree/-/interval-tree-1.1.2.tgz#fcc891da48bc230392884be01c26fe8c625702e8"
integrity sha512-OwLoV9E/XM6b7bes2rSFnGNjyRy7vcoIHFTnmBR2WAaZTf0Fe4EX4GdA65vU1KgFAasti7iRSg2dZfYd1Zt00Q==

"@hapi/hoek@^9.0.0":
version "9.3.0"
resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb"
Expand Down Expand Up @@ -2752,6 +2757,16 @@ buffer@^5.5.0:
base64-js "^1.3.1"
ieee754 "^1.1.13"

bunyamin@^1.5.0:
version "1.5.2"
resolved "https://registry.yarnpkg.com/bunyamin/-/bunyamin-1.5.2.tgz#681db204c0b16531369d5c1f6c89dc8d760b7558"
integrity sha512-Xp2nfqk33zt3nX90OSTkLVOc5N+1zdR3MWvfLHoIrm3cGRkdxPTPYB9CCgrDV8oum5rbghJjAbmXFXOrRXvMtg==
dependencies:
"@flatten-js/interval-tree" "^1.1.2"
multi-sort-stream "^1.0.4"
stream-json "^1.7.5"
trace-event-lib "^1.3.1"

bunyan-debug-stream@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/bunyan-debug-stream/-/bunyan-debug-stream-3.1.0.tgz#78309c67ad85cfb8f011155334152c49209dcda8"
Expand All @@ -2769,6 +2784,18 @@ bunyan@^1.8.12:
mv "~2"
safe-json-stringify "~1"

bunyan@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/bunyan/-/bunyan-2.0.5.tgz#9dd056755220dddd8b5bb9cf76f3d0d766e96e71"
integrity sha512-Jvl74TdxCN6rSP9W1I6+UOUtwslTDqsSFkDqZlFb/ilaSvQ+bZAnXT/GT97IZ5L+Vph0joPZPhxUyn6FLNmFAA==
dependencies:
exeunt "1.1.0"
optionalDependencies:
dtrace-provider "~0.8"
moment "^2.19.3"
mv "~2"
safe-json-stringify "~1"

bytes@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
Expand Down Expand Up @@ -3252,10 +3279,10 @@ detect-newline@^3.0.0:
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==

detox@^20.11.4:
version "20.11.4"
resolved "https://registry.yarnpkg.com/detox/-/detox-20.11.4.tgz#2347f320da0e7eae2a0c2691bf8986768d02d8ee"
integrity sha512-P48KAtK8qIDOxJKUl4q/syPkuHz67kAeFlNodBZg5aO4hJiH+RsbEkQfJSYkTCeZV800EcmUQwZK2M5amLoYaw==
detox@^20.17.0:
version "20.17.0"
resolved "https://registry.yarnpkg.com/detox/-/detox-20.17.0.tgz#836d2ebb193572e1f4a97e44af343891a5658f7b"
integrity sha512-IasYgexfkrCoZuJTaqqKHQ2yflK+tnqifzdLwrp4hdTWlXUlG9j/YcM1Dn3ThSs3b6VNMtbSe6xoPkKD0oNiIQ==
dependencies:
ajv "^8.6.3"
bunyan "^1.8.12"
Expand All @@ -3269,6 +3296,7 @@ detox@^20.11.4:
funpermaproxy "^1.1.0"
glob "^8.0.3"
ini "^1.3.4"
jest-environment-emit "^1.0.5"
json-cycle "^1.3.0"
lodash "^4.17.11"
multi-sort-stream "^1.0.3"
Expand Down Expand Up @@ -3721,6 +3749,11 @@ execa@^5.0.0, execa@^5.1.1:
signal-exit "^3.0.3"
strip-final-newline "^2.0.0"

exeunt@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/exeunt/-/exeunt-1.1.0.tgz#af72db6f94b3cb75e921aee375d513049843d284"
integrity sha512-dd++Yn/0Fp+gtJ04YHov7MeAii+LFivJc6KqnJNfplzLVUkUDrfKoQDTLlCgzcW15vY5hKlHasWeIsQJ8agHsw==

exit@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
Expand Down Expand Up @@ -4874,6 +4907,20 @@ jest-each@^29.6.3:
jest-util "^29.6.3"
pretty-format "^29.6.3"

jest-environment-emit@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/jest-environment-emit/-/jest-environment-emit-1.0.5.tgz#e6f33451f98b88ccd48e9e1188bb535880f03c1b"
integrity sha512-OsQ08AhYxkkyDBTIow+9ogNmJheQIGWQKp0Nku+1ToLWjAj2Pd6LmypN8HgUIqYHs4HFcqkQ25kaf1qExmoZpg==
dependencies:
bunyamin "^1.5.0"
bunyan "^2.0.5"
bunyan-debug-stream "^3.1.0"
funpermaproxy "^1.1.0"
lodash.merge "^4.6.2"
node-ipc "9.2.1"
strip-ansi "^6.0.0"
tslib "^2.5.3"

jest-environment-node@^29.2.1, jest-environment-node@^29.6.4:
version "29.6.4"
resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.6.4.tgz#4ce311549afd815d3cafb49e60a1e4b25f06d29f"
Expand Down Expand Up @@ -6215,7 +6262,7 @@ ms@2.1.3:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==

multi-sort-stream@^1.0.3:
multi-sort-stream@^1.0.3, multi-sort-stream@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/multi-sort-stream/-/multi-sort-stream-1.0.4.tgz#e4348edc9edc36e16333e531a90c0f166235cc99"
integrity sha512-hAZ8JOEQFbgdLe8HWZbb7gdZg0/yAIHF00Qfo3kd0rXFv96nXe+/bPTrKHZ2QMHugGX4FiAyET1Lt+jiB+7Qlg==
Expand Down Expand Up @@ -7537,7 +7584,7 @@ stream-chain@^2.2.5:
resolved "https://registry.yarnpkg.com/stream-chain/-/stream-chain-2.2.5.tgz#b30967e8f14ee033c5b9a19bbe8a2cba90ba0d09"
integrity sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA==

stream-json@^1.7.4:
stream-json@^1.7.4, stream-json@^1.7.5:
version "1.8.0"
resolved "https://registry.yarnpkg.com/stream-json/-/stream-json-1.8.0.tgz#53f486b2e3b4496c506131f8d7260ba42def151c"
integrity sha512-HZfXngYHUAr1exT4fxlbc1IOce1RYxp2ldeaf97LYCOPSoOqY/1Psp7iGvpb+6JIOgkra9zDYnPX01hGAHzEPw==
Expand Down Expand Up @@ -7840,7 +7887,7 @@ tslib@^1.8.1:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==

tslib@^2.0.1:
tslib@^2.0.1, tslib@^2.5.3:
version "2.6.2"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
Expand Down
2 changes: 1 addition & 1 deletion src/gesture-handler/ScreenGestureDetector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
getAnimationForTransition,
} from './constraints';

const EmptyGestureHandler = Gesture.Tap();
const EmptyGestureHandler = Gesture.Fling();

const ScreenGestureDetector = ({
children,
Expand Down
Loading