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(CI): fix Android E2E Events test #1898

Closed
wants to merge 2 commits into from
Closed

Conversation

tboba
Copy link
Member

@tboba tboba commented Sep 21, 2023

Description

Every now and then our CI was failing on the specific test - events.e2e.ts. The issue was that the toasts that were displayed during the test were dismissed too quickly (even after 40 seconds of waiting).
This PR fixes the problem with checking if the application is running on the Detox server.

When I was making that change I was thinking about couple approaches how to detect if the machine that runs the tests is Detox:
❌ Using react-native-is-detox lib: I didn't want to have additional lib that seems to be not maintained actively + this approach is error-prone: there's for sure a better alternative than checking the environment natively
❌ Using .env files as environment libraries (with react-native-config lib): it's a great idea for using multiple values but it's a huge over-exaggerate when dealing only with single state
✅ I think using launch arguments is a best approach here, as it is lightweight while using only one value.

Changes

  • Fixed failing E2E test (events.e2e.ts)
  • Decreased the amount of time to dismiss the toast

Checklist

  • Ensured that CI passes

@tboba tboba requested a review from kkafar September 21, 2023 14:06
@tboba
Copy link
Member Author

tboba commented Sep 21, 2023

Closing, as we're planing to experiment with switching our current CI engine to Maestro + it looks like my change still doesn't fix the results :(

@tboba tboba closed this Sep 21, 2023
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.

1 participant