From e862102b608e7a6b717a289dff69b5b4889f29ba Mon Sep 17 00:00:00 2001 From: Dan Caseley Date: Tue, 4 Feb 2025 20:51:18 +0000 Subject: [PATCH] Add support for the Action command --- schema/schema.v0.json | 24 ++++++++++++++++++++++++ tests/examples/extreme.yaml | 6 ++++++ 2 files changed, 30 insertions(+) diff --git a/schema/schema.v0.json b/schema/schema.v0.json index f25865d..9976849 100644 --- a/schema/schema.v0.json +++ b/schema/schema.v0.json @@ -67,6 +67,9 @@ "type": "array", "items": { "oneOf": [ + { + "$ref": "#/$defs/Commands/Action" + }, { "$ref": "#/$defs/Commands/AddMedia" }, @@ -347,6 +350,27 @@ ] }, "Commands": { + "Action": { + "title": "action", + "type": "object", + "additionalProperties": false, + "required": [ + "action" + ], + "properties": { + "action": { + "type": "string", + "description": "The action to be performed", + "enum": [ + "back", + "clearKeychain", + "hideKeyboard", + "pasteText", + "scroll" + ] + } + } + }, "AddMedia": { "title": "addMedia", "type": "object", diff --git a/tests/examples/extreme.yaml b/tests/examples/extreme.yaml index cfd1520..01f44cd 100644 --- a/tests/examples/extreme.yaml +++ b/tests/examples/extreme.yaml @@ -14,6 +14,12 @@ onFlowComplete: - runFlow: teardown.yaml - runScript: teardown.js --- +- action: 'back' +- action: 'hideKeyboard' +- action: 'scroll' +- action: 'clearKeychain' +- action: 'pasteText' + - addMedia: - "./assets/foo.png" - "./assets/foo.mp4"