[Epic 🔥] iOS: Support for System Dialogs
iOS: Support System Dialog interactions via XCUITest
Description
Elevate Detox's iOS testing capabilities through interaction with system dialogs, overcoming limitations in automated testing scenarios that involve system-level interactions.
Impact
This initiative broadens Detox's application in testing environments, enabling seamless automation of scenarios involving authentication prompts, permission dialogs, and other system interactions. It facilitates more comprehensive test suites, supporting multi-app flows and real device testing without additional code signing hurdles.
Resolves https://github.com/wix/Detox/issues/4275, https://github.com/wix/Detox/issues/3227, https://github.com/wix/Detox/issues/3017
Solution Details
The general approach is to implement this support by integrating XCUITest into Detox.
- XCUITest Integration: Establish a communication channel between Detox and XCUITest to enable direct interaction with iOS system dialogs.
- Support System Dialogs in regular Matchers: Utilize XCUITest matchers for detecting and interacting with UI elements in system dialogs. Implement as a fallback for the current matching mechanism.
- Support Basic Interactions on Dialog Buttons: Implement functionality for tapping on dialog buttons, crucial for testing permissions, alerts, and other system prompts.
Integrating XCUITest to support system dialogs will mark a significant advancement in Detox (iOS), ensuring more robust and comprehensive testing capabilities. This will enable features that were not supported until now, such as interactions with unmocked push notifications and social login flows.
### Tasks
- [ ] https://github.com/wix/Detox/issues/4433
- [ ] https://github.com/wix/Detox/issues/4434
- [ ] https://github.com/wix/Detox/issues/4435
This initiative broadens Detox's application in testing environments, enabling seamless automation of scenarios involving authentication prompts, permission dialogs, and other system interactions. It facilitates more comprehensive test suites, supporting multi-app flows and real device testing without additional code signing hurdles.
Does this imply enabling testing on physical iOS devices, as recorded in #95?
@josmithua No, this will enable permission request handling for hardware device testing in the future, but it doesn't enable hardware support at the moment. The support requires more than that, especially because we deeply rely on simctl for the device APIs. We'll have to implement a separate driver and a different setup for that.
Closed as finished.