wix / Detox

Gray box end-to-end testing and automation framework for mobile apps
https://wix.github.io/Detox/
MIT License
11.2k stars 1.92k forks source link

Testing Apple Authorization in React Native App using #4101

Open maksim-romanov opened 1 year ago

maksim-romanov commented 1 year ago

Description

I have implemented Apple authorization in my React Native app using the "@invertase/react-native-apple-authentication" package. However, I'm facing difficulties in testing the functionality to ensure that the Apple authentication is working properly. I would appreciate any guidance or suggestions on how to effectively test the Apple authentication feature in my app.

Your environment

Detox version: 20.9.1 React Native version: 0.71.3 Node version: 19 Device model: simulator OS: ios/android Test-runner (select one): jest

Vepsur commented 1 year ago

I have the same issue too

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this repository, read this discussion.

stale[bot] commented 1 year ago

The issue has been closed for inactivity.

asafkorem commented 1 year ago

Hi @maksim-romanov @Vepsur, I haven't wrote any e2e test for this before. AFAIK, Apple's login screen (as well as purchase screens) are managed by the iOS and aren't part of the app (in terms of UI), so Detox is unable to interact with those components, for now.

We are planning to introduce system-level interactions support on Detox 21 (next major version of Detox): https://github.com/wix/Detox/issues/3208.

Please note that you can mock this part of your flow for testing purposes of other parts that are being affected by the login. For that, please check our mocking guide.