Skip to content

feat: add support for setting airplane mode with environment variables - #3192

Open
sailsdima wants to merge 6 commits into
mobile-dev-inc:mainfrom
sailsdima:setAirplaneMode-env-variables-support
Open

feat: add support for setting airplane mode with environment variables#3192
sailsdima wants to merge 6 commits into
mobile-dev-inc:mainfrom
sailsdima:setAirplaneMode-env-variables-support

Conversation

@sailsdima

Copy link
Copy Markdown
Contributor

Proposed changes

This PR adds environment variable support to the setAirplaneMode command. Previously, setAirplaneMode only accepted hardcoded literal values (enabled/disabled). With this change, users can now pass environment variables as well.
copilot:summary

What Changed:
SetAirplaneModeCommand - now accepts String value instead of AirplaneValue enum (to support ${...}) variable references. Variables are resolved at runtime via evaluateScripts().
YamlSetAirplaneMode - rewrote deserializer to pass through variable references at parse time; literal values are still validated eagerly.
Orchestra - Uses resolvedValue() instead of direct enum access.

Usage Example:

appId: com.example.app
env:
  airplaneOn: enabled
  airplaneOff: disabled
---
- setAirplaneMode: ${airplaneOn}
- setAirplaneMode: ${airplaneOff}
- setAirplaneMode: enabled # still works
- setAirplaneMode: disabled # still works

Testing

Does this need e2e tests? The demo app lives in e2e/demo_app/ — add a test screen and Maestro flow in the same PR. See e2e/demo_app/CLAUDE.md for details.

Unit tests:

  • YamlCommandReaderTest (parsing with env vars + invalid value error),
  • CommandDescriptionTest (description evaluation).

Integration test: added new test in IntegrationTest that runs runs setAirplaneMode with env variables through the full pipeline.

e2e test: Extended existing e2e setAirplaneMode.yaml to test env variable for airplane mode.

All existing tests pass with no regressions.

image image

Issues fixed

#2878

@sailsdima sailsdima changed the title feat: add support for setting airplane mode with environment variables + Unit and e2e test coverage feat: add support for setting airplane mode with environment variables Apr 18, 2026
Comment thread maestro-test/src/test/kotlin/maestro/test/IntegrationTest.kt Outdated
Comment thread maestro-orchestra-models/src/main/java/maestro/orchestra/Commands.kt Outdated
@sailsdima
sailsdima marked this pull request as ready for review April 18, 2026 21:43
@Fishbowler
Fishbowler force-pushed the setAirplaneMode-env-variables-support branch 2 times, most recently from 80306a3 to c29354e Compare June 15, 2026 20:17
@Fishbowler
Fishbowler force-pushed the setAirplaneMode-env-variables-support branch 4 times, most recently from 63f6920 to 3a11c58 Compare July 1, 2026 10:50
@Fishbowler
Fishbowler force-pushed the setAirplaneMode-env-variables-support branch from 3a11c58 to b927a8a Compare July 2, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants