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

feat: android e2e tests #1360

Merged
merged 1 commit into from
Jun 17, 2024
Merged

feat: android e2e tests #1360

merged 1 commit into from
Jun 17, 2024

Conversation

limpbrains
Copy link
Collaborator

@limpbrains limpbrains commented Nov 1, 2023

Description

  • detox e2e tests are running on ubuntu-latest
  • had to patch react-native-quick-crypto to make it compile
  • updated react-native-camera-kit for the same reason - fix compile error

Type of change

Refactoring

Tests

Detox test

@limpbrains limpbrains force-pushed the detox-android branch 4 times, most recently from 95c76e4 to ee5b263 Compare November 6, 2023 16:25
@limpbrains limpbrains force-pushed the detox-android branch 8 times, most recently from abdc98d to d212074 Compare November 12, 2023 10:34
@limpbrains limpbrains force-pushed the detox-android branch 2 times, most recently from 907da22 to d404e5d Compare November 30, 2023 13:15
@limpbrains limpbrains force-pushed the detox-android branch 8 times, most recently from b7ec400 to 36f0a19 Compare December 10, 2023 08:48
@limpbrains limpbrains force-pushed the detox-android branch 3 times, most recently from f84c928 to 1953665 Compare January 11, 2024 09:46
@synonymdev synonymdev deleted a comment from github-actions bot Jan 12, 2024
@synonymdev synonymdev deleted a comment from github-actions bot Jan 12, 2024
@synonymdev synonymdev deleted a comment from github-actions bot Jan 12, 2024
@synonymdev synonymdev deleted a comment from github-actions bot Jan 12, 2024
@synonymdev synonymdev deleted a comment from github-actions bot Jan 12, 2024
@limpbrains limpbrains force-pushed the detox-android branch 5 times, most recently from 22768d6 to 0909e94 Compare June 15, 2024 12:27
@limpbrains limpbrains marked this pull request as draft June 15, 2024 12:30
@limpbrains limpbrains force-pushed the detox-android branch 2 times, most recently from 80a7e35 to 5ba8396 Compare June 15, 2024 17:14
Copy link

socket-security bot commented Jun 15, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@limpbrains limpbrains force-pushed the detox-android branch 4 times, most recently from e5c48b8 to c747669 Compare June 16, 2024 23:32
@limpbrains limpbrains marked this pull request as ready for review June 17, 2024 09:58
@limpbrains limpbrains requested a review from pwltr June 17, 2024 09:58
Comment on lines +74 to +75
await waitFor(element(by.id('NewWallet'))).toBeVisible();
await sleep(100); // wtf?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if that fixes it but according to docs waitFor must have a withTimeout otherwise it doesn't do anything.

Suggested change
await waitFor(element(by.id('NewWallet'))).toBeVisible();
await sleep(100); // wtf?
await waitFor(element(by.id('NewWallet'))).toBeVisible().withTimeout(2000);
await sleep(100); // wtf?

https://github.com/nubank/detox/blob/master/docs/APIRef.waitFor.md

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a link to outdated version of docs from 7 years ago.
I can't find anything like this on wix.github.io
https://wix.github.io/Detox/docs/api/expect

package.json Show resolved Hide resolved
Copy link

socket-security bot commented Jun 17, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] None 0 311 kB scarlac

🚮 Removed packages: npm/[email protected]

View full report↗︎

@limpbrains
Copy link
Collaborator Author

Had to push an update, but before that there were a series of 5 uninterrupted successful test runs
And before that around 10

@limpbrains
Copy link
Collaborator Author

wtf

BUILD SUCCESSFUL in 15m 14s
3066 actionable tasks: 3066 executed
After running the build command, Detox could not find your app at the given binary path:
	android/app/build/outputs/apk/release/app-release.apk

@pwltr
Copy link
Collaborator

pwltr commented Jun 17, 2024

It's probably because of #1992, try changing it to app-x86_64-release.apk or app-x86_64-debug.apk

@limpbrains
Copy link
Collaborator Author

Is it possible only do x86_64 build for detox tests? This might speedup the build/test

@pwltr
Copy link
Collaborator

pwltr commented Jun 17, 2024

yeah I think like this in detoxrc should work (just add the flag):

$ ./gradlew :app:assembleDebug -PreactNativeArchitectures=x86_64

@limpbrains limpbrains merged commit 39b7a3d into master Jun 17, 2024
7 checks passed
@limpbrains limpbrains deleted the detox-android branch June 17, 2024 17:34
@catch-21
Copy link
Contributor

catch-21 commented Jul 4, 2024

Reviewed the tests and CI runs. We can definitely make some improvements such as remvoing hard-coded waits in favour of checking e.g. that backups have succeeded, but it looks stable and the time saving is not worthwhile at this time. LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants