-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Support for XCTest addUIInterruptionMonitor for iOS system alerts and dialogs #3017
Comments
Thanks for the suggestion, @antgly! We will keep this in mind in the context of our work on XCTest integ. in #2741. @asafkorem FYI 😄 |
@antgly Currently, for system alerts such as permissions (it's not possible, yet) but... for system alerts triggered by |
Nice blogpost, @lukebrandonfarrell! 😄 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this reporsitory, read this discussion. |
Still interested in this (as are many following this project) 👍 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this reporsitory, read this discussion. |
The issue has been closed for inactivity. |
Can we keep this issue open as it’s a blocker for many apps’ system interactions? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this reporsitory, read this discussion. |
The issue has been closed for inactivity. |
Released with Detox v20.22 |
I'm aware that the XCTest framework on iOS supports intercepting and interacting with system alerts, which is currently not a part of Detox.
It would be great if we could overload
expect
to await on an alert by text, instead of an element, passing in the text of the button to tap and/or the alert text to verify.An example method call would look like this:
await expect(alert(by.text('This is an alert')).toBeVisible()
await alert(by.button('OK').tap()
If this has to be done as a setup step, then maybe an API like this could be useful:
It could reject the promise if no button with label appears or if the alert doesn't appear within
expect
timeframe.Apple's resource on the matter: https://developer.apple.com/documentation/xctest/xctestcase/handling_ui_interruptions
The text was updated successfully, but these errors were encountered: