Closed ZineAoraya closed 2 years ago
You may use a third party service like Twilio. They provide api's to manage phone numbers and also allow you to read the sms.
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 reporsitory, read this discussion.
@d4vidi do we have a solution? Or we should just tell to mock this?
We had a use case that was similar and ended up going the route that @indradeepchowdhury mentioned and ended up using the Twilio API.
Typically, we would advise testing in a more stable mocked environment. Namely, running the (login?) flow all the way to the OTP, mocking away the OTP service itself, and only making sure it was triggered properly using your mock. For example, render a screen showing which args were passed to it and asserting them using toBeVisible()
calls.
If, nevertheless, you need to test this E2E in an unmocked (though potentially flaky) way, you might want to consider using twillio's OTP solution, as suggested.
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 reporsitory, read this discussion.
The issue has been closed for inactivity.
How can I test when app requires OTP via SMS?