Skip to content

Commit

Permalink
Add support for SetAirplaneMode and ToggleAirplaneMode commands
Browse files Browse the repository at this point in the history
Fixes #31
  • Loading branch information
Fishbowler committed Jan 16, 2025
1 parent 708aeba commit 06bf3fa
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@
"tests/examples/*.yaml"
]
},
"cSpell.words": [
"airplane"
],
}
107 changes: 107 additions & 0 deletions schema/schema.v0.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@
{
"$ref": "#/$defs/Commands/AddMedia"
},
{
"$ref": "#/$defs/Commands/AirplaneModeSet"
},
{
"$ref": "#/$defs/Commands/AirplaneModeToggle"
},
{
"$ref": "#/$defs/Commands/AssertNoDefectsWithAI"
},
Expand Down Expand Up @@ -392,6 +398,107 @@
}
}
},
"AirplaneModeSet": {
"title": "setAirplaneMode",
"type": "object",
"additionalProperties": false,
"required": [
"setAirplaneMode"
],
"properties": {
"setAirplaneMode": {
"oneOf": [
{
"description": "Command to enable or disable airplane mode on the device",
"type": "string",
"enum": [
"enabled",
"disabled"
]
},
{
"description": "Command to enable or disable airplane mode on the device",
"type": "object",
"additionalProperties": false,
"properties": {
"value": {
"title": "setAirplaneMode.value",
"type": "string",
"enum": [
"enabled",
"disabled"
],
"description": "Whether to enable or disable airplane mode"
},
"label": {
"title": "setAirplaneMode.label",
"type": "string",
"description": "Description of the action to be performed."
},
"optional": {
"title": "setAirplaneMode.optional",
"type": "boolean",
"description": "Indicates if the action is optional."
}
},
"examples": [
{
"value": "enabled"
},
{
"value": "disabled",
"label": "Disable airplane mode",
"optional": true
}
]
}
]
}
}
},
"AirplaneModeToggle": {
"oneOf": [
{
"type": "string",
"title": "toggleAirplaneMode",
"const": "toggleAirplaneMode",
"description": "Command to toggle airplane mode on the device"
},
{
"type": "object",
"title": "toggleAirplaneMode",
"additionalProperties": false,
"required": [
"toggleAirplaneMode"
],
"properties": {
"toggleAirplaneMode": {
"type": "object",
"description": "Command to toggle airplane mode on the device",
"additionalProperties": false,
"properties": {
"label": {
"title": "toggleAirplaneMode.label",
"type": "string",
"description": "Description of the action to be performed."
},
"optional": {
"title": "toggleAirplaneMode.optional",
"type": "boolean",
"description": "Indicates if the action is optional."
}
},
"examples": [
{
"label": "Toggle airplane mode",
"optional": true
}
]
}
}
}
]
},
"AssertNoDefectsWithAI": {
"oneOf": [
{
Expand Down
14 changes: 11 additions & 3 deletions tests/examples/extreme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,17 @@ onFlowComplete:
visibilityPercentage: 100
centerElement: false

# https://github.com/Mastersam07/maestro-workbench/issues/31
#- setAirplaneMode: enabled
#- setAirplaneMode: disabled
- setAirplaneMode: enabled
- setAirplaneMode: disabled
- setAirplaneMode:
value: 'enabled'
label: 'Enable airplane mode'
optional: false

- toggleAirplaneMode
- toggleAirplaneMode:
label: 'Toggle airplane mode'
optional: false

- setLocation:
latitude: 52.3599976
Expand Down

0 comments on commit 06bf3fa

Please sign in to comment.