maestro
maestro copied to clipboard
feat: allow airplane mode control
Proposed Changes
add a new command for controlling the airplane mode of android devices.
Testing
ran the following flow on android 27 and 28 emulators:
appId: org.wikipedia
---
- launchApp
- setAirplaneMode: disable
- setAirplaneMode: enable
@NyCodeGHG Nice 🎉 Let's update it to be a single command - toggleAirplaneMode
instead and then we'll move forward with a formal review to get it merged. Thanks!
@axelniklasson hi, thank you for the review. When I implemented this feature I had another option to toggle the airplane mode, but I removed it as it doesn't explicitly define the desired behavior. I can add another option to toggle if you want, but I'd prefer to keep the enable and disable options for those who want to be explicit.
@axelniklasson hi, thank you for the review. When I implemented this feature I had another option to toggle the airplane mode, but I removed it as it doesn't explicitly define the desired behavior. I can add another option to toggle if you want, but I'd prefer to keep the enable and disable options for those who want to be explicit.
Hey, that's fair and a good use case to me. Let's keep the API as it is but also add - toggleAirplaneMode
as a separate command
@axelniklasson I'm not sure on the integration test case Can you elaborate?
@axelniklasson I'm not sure on the integration test case Can you elaborate?
@NyCodeGHG let's add another test case to IntegrationTest.kt with an example Flow that uses the commands to ensure that all commands are parsed correctly etc. You can take a look at the other test cases to get a feel for how we usually test new commands
Thanks @NyCodeGHG! Merging this now but please do also raise a PR in https://github.com/mobile-dev-inc/maestro-docs documenting the new commands - we'll merge it when we make the next release 👍
Thanks again for your contribution!
will do!