wisp-schema 1.14.0 → 1.15.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca86f8f6713a4ee0b8b4b9d9b7df25c28408e0ced807765b919be04eff99f3ba
4
- data.tar.gz: 9e1b0f98826db5b175eb2031895060e5beb278e376edfe906c8de5aa90ce225c
3
+ metadata.gz: 1b4da9e9e52e2f3eb3676060e827663812a8a6cac3b6927d907a202c227648a6
4
+ data.tar.gz: a90e56c2d2d3bbb6266f35c4ae43fa64109eb2804e39d377fcf920d37c7691f8
5
5
  SHA512:
6
- metadata.gz: 6cddc6f0179b07d192bcb4886c08f3f1ac6e88f68a52c48852fc1047cb3faccf9adf6986c9e113f28faf3d54a2bf173e41eb96f9ca4c8188b471230d3873eb02
7
- data.tar.gz: 22c74b1314b289d5b5b7d56cc1273042720326dbf8fcd28ac72a3b1ea6d23bba9de3b374c90c773e18b3bf33517bcee78e8a92d9687fd2ddd6cb751b6072791c
6
+ metadata.gz: b5c412a740cf167e099c252d61c9cfd2fe227c07fc9c080ed64134c5c764c8c88498185382718417d67370ec2f9e42c658b0e55ca9f1ca3f258ac168e1775db8
7
+ data.tar.gz: b72e814722ff0b81514c0e0cde30d33d14b248d8bf2416a968ead4f066370dda38c07b6e8b955730de41963ef8bb686498b98515d29b3f72e40814eaa8413612
data/canary-wisp.json CHANGED
@@ -112,6 +112,7 @@
112
112
  {"$ref": "#/definitions/ai_confirmation"},
113
113
  {"$ref": "#/definitions/click"},
114
114
  {"$ref": "#/definitions/comment"},
115
+ {"$ref": "#/definitions/conditional_observe"},
115
116
  {"$ref": "#/definitions/double_click"},
116
117
  {"$ref": "#/definitions/fill"},
117
118
  {"$ref": "#/definitions/type"},
@@ -204,6 +205,75 @@
204
205
  "additionalProperties": false,
205
206
  "required": ["action", "text"]
206
207
  },
208
+ "conditional_block": {
209
+ "type": "object",
210
+ "title": "Conditional Block",
211
+ "description": "Structure for a conditional block",
212
+ "properties": {
213
+ "id": {"title": "Conditional Block ID", "type": "integer"},
214
+ "verbs": {
215
+ "type": "array",
216
+ "title": "Verbs",
217
+ "items": {
218
+ "$ref": "#/definitions/verb"
219
+ }
220
+ }
221
+ },
222
+ "additionalProperties": false,
223
+ "required": ["verbs"]
224
+ },
225
+ "conditional_observe": {
226
+ "type": "object",
227
+ "action_type": "assertion",
228
+ "title": "Conditional Observe",
229
+ "description": "Checks if element of the UI is visible or not to decide if the test should execute conditional block or not.",
230
+ "properties": {
231
+ "action": {
232
+ "enum": ["conditional_observe"]
233
+ },
234
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
235
+ "id": {"title": "Action ID", "type": "integer"},
236
+ "job_step_id": {
237
+ "title": "The id of the action's related job step",
238
+ "type": "integer"
239
+ },
240
+ "delay_after": {"title": "Delay after in seconds", "type": "integer"},
241
+ "object": {
242
+ "title": "Object",
243
+ "$ref": "#/definitions/noun"
244
+ },
245
+ "seconds": {
246
+ "title": "seconds",
247
+ "type": "integer",
248
+ "minimum": 10,
249
+ "maximum": 3600
250
+ },
251
+ "visibility": {
252
+ "title": "Is the element visible?",
253
+ "type": "boolean",
254
+ "enum": [true, false]
255
+ },
256
+ "conditional_blocks": {
257
+ "title": "Conditional Blocks",
258
+ "type": "object",
259
+ "description": "Structure for conditional blocks",
260
+ "properties": {
261
+ "conditional_passed": {
262
+ "title": "Conditional Passed",
263
+ "$ref": "#/definitions/conditional_block"
264
+ },
265
+ "conditional_failed": {
266
+ "title": "Conditional Failed",
267
+ "$ref": "#/definitions/conditional_block"
268
+ }
269
+ },
270
+ "additionalProperties": false,
271
+ "required": ["conditional_passed"]
272
+ }
273
+ },
274
+ "additionalProperties": false,
275
+ "required": ["action", "object", "visibility", "conditional_blocks"]
276
+ },
207
277
  "double_click": {
208
278
  "type": "object",
209
279
  "action_type": "action",
data/lib/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wisp
4
- VERSION = "1.14.0"
5
- STABLE_VERSION = "1.14.0"
4
+ VERSION = "1.15.1"
5
+ STABLE_VERSION = "1.15.1"
6
6
  CANARY_VERSION = "2.0.0"
7
7
  end
data/lib/wisp-schema.rb CHANGED
@@ -21,6 +21,7 @@ module Wisp
21
21
  "click",
22
22
  "close_tab",
23
23
  "comment",
24
+ "conditional_observe",
24
25
  "double_click",
25
26
  "drag_and_drop",
26
27
  "fill",
@@ -68,4 +69,14 @@ module Wisp
68
69
  JSONSchemer.schema(Pathname.new(File.expand_path("../stable/actions/#{action}.json", __dir__)))
69
70
  end
70
71
  module_function :action_schemer
72
+
73
+ def verbs_schemer(_raw_version)
74
+ JSONSchemer.schema(Pathname.new(File.expand_path("../stable/verbs.json", __dir__)))
75
+ end
76
+ module_function :verbs_schemer
77
+
78
+ def embedded_test_schemer(_raw_version)
79
+ JSONSchemer.schema(Pathname.new(File.expand_path("../stable/embeddings/embedded_test.json", __dir__)))
80
+ end
81
+ module_function :embedded_test_schemer
71
82
  end
@@ -0,0 +1,56 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "action_type": "assertion",
5
+ "title": "Conditional Observe",
6
+ "description": "Checks if element of the UI is visible or not to decide if the test should execute conditional block or not.",
7
+ "properties": {
8
+ "action": {
9
+ "enum": ["conditional_observe"]
10
+ },
11
+ "id": {"title": "Action ID", "type": "integer"},
12
+ "job_step_id": {
13
+ "title": "The id of the action's related job step",
14
+ "type": "integer"
15
+ },
16
+ "delay_after": {"title": "Delay after in seconds", "type": "integer"},
17
+ "object": {
18
+ "title": "Object",
19
+ "$ref": "ui_element_reference.json"
20
+ },
21
+ "seconds": {
22
+ "title": "seconds",
23
+ "type": "integer",
24
+ "minimum": 10,
25
+ "maximum": 3600
26
+ },
27
+ "visibility": {
28
+ "title": "Is the element visible?",
29
+ "type": "boolean",
30
+ "enum": [true, false]
31
+ },
32
+ "version": {
33
+ "type": "string",
34
+ "title": "Version"
35
+ },
36
+ "conditional_blocks": {
37
+ "title": "Conditional Blocks",
38
+ "type": "object",
39
+ "description": "Structure for conditional blocks",
40
+ "properties": {
41
+ "conditional_passed": {
42
+ "title": "Conditional Passed",
43
+ "$ref": "../blocks/conditional_block.json"
44
+ },
45
+ "conditional_failed": {
46
+ "title": "Conditional Failed",
47
+ "$ref": "../blocks/conditional_block.json"
48
+ }
49
+ },
50
+ "additionalProperties": false,
51
+ "required": ["conditional_passed"]
52
+ }
53
+ },
54
+ "additionalProperties": false,
55
+ "required": ["action", "object", "visibility", "version", "conditional_blocks"]
56
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "title": "Conditional Block",
5
+ "description": "Structure for a conditional block",
6
+ "properties": {
7
+ "id": {"title": "Conditional Block ID", "type": "integer"},
8
+ "verbs": {
9
+ "title": "Verbs",
10
+ "$ref": "../verbs.json"
11
+ }
12
+ },
13
+ "additionalProperties": false,
14
+ "required": ["verbs"]
15
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "action_type": "embedded_test",
5
+ "title": "Embedded Test",
6
+ "description": "Embeds a Test",
7
+ "properties": {
8
+ "action": {
9
+ "enum": ["embedded_test"]
10
+ },
11
+ "test_id": {
12
+ "title": "Test ID",
13
+ "type": "integer"
14
+ },
15
+ "id": {
16
+ "title": "Action ID",
17
+ "type": "integer"
18
+ },
19
+ "version": {
20
+ "type": "string",
21
+ "title": "Version"
22
+ }
23
+ },
24
+ "additionalProperties": false,
25
+ "required": ["action", "test_id"]
26
+ }
data/stable/verbs.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "array",
4
+ "title": "Verbs",
5
+ "items": {
6
+ "title": "Wisp Verb",
7
+ "oneOf": [
8
+ {"$ref": "actions/ai_confirmation.json"},
9
+ {"$ref": "actions/click.json"},
10
+ {"$ref": "actions/comment.json"},
11
+ {"$ref": "actions/conditional_observe.json"},
12
+ {"$ref": "actions/double_click.json"},
13
+ {"$ref": "actions/fill.json"},
14
+ {"$ref": "actions/type.json"},
15
+ {"$ref": "actions/send_key.json"},
16
+ {"$ref": "actions/hover.json"},
17
+ {"$ref": "actions/select.json"},
18
+ {"$ref": "actions/refresh.json"},
19
+ {"$ref": "actions/navigate.json"},
20
+ {"$ref": "actions/close_tab.json"},
21
+ {"$ref": "actions/scroll.json"},
22
+ {"$ref": "actions/wait.json"},
23
+ {"$ref": "actions/drag_and_drop.json"},
24
+ {"$ref": "actions/tester_instruction.json"},
25
+ {"$ref": "actions/observe.json"},
26
+ {"$ref": "actions/tester_confirmation.json"},
27
+ {"$ref": "embeddings/embedded_test.json"}
28
+ ]
29
+ }
30
+ }
data/wisp.json CHANGED
@@ -112,6 +112,7 @@
112
112
  {"$ref": "#/definitions/ai_confirmation"},
113
113
  {"$ref": "#/definitions/click"},
114
114
  {"$ref": "#/definitions/comment"},
115
+ {"$ref": "#/definitions/conditional_observe"},
115
116
  {"$ref": "#/definitions/double_click"},
116
117
  {"$ref": "#/definitions/fill"},
117
118
  {"$ref": "#/definitions/type"},
@@ -204,6 +205,75 @@
204
205
  "additionalProperties": false,
205
206
  "required": ["action", "text"]
206
207
  },
208
+ "conditional_block": {
209
+ "type": "object",
210
+ "title": "Conditional Block",
211
+ "description": "Structure for a conditional block",
212
+ "properties": {
213
+ "id": {"title": "Conditional Block ID", "type": "integer"},
214
+ "verbs": {
215
+ "type": "array",
216
+ "title": "Verbs",
217
+ "items": {
218
+ "$ref": "#/definitions/verb"
219
+ }
220
+ }
221
+ },
222
+ "additionalProperties": false,
223
+ "required": ["verbs"]
224
+ },
225
+ "conditional_observe": {
226
+ "type": "object",
227
+ "action_type": "assertion",
228
+ "title": "Conditional Observe",
229
+ "description": "Checks if element of the UI is visible or not to decide if the test should execute conditional block or not.",
230
+ "properties": {
231
+ "action": {
232
+ "enum": ["conditional_observe"]
233
+ },
234
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
235
+ "id": {"title": "Action ID", "type": "integer"},
236
+ "job_step_id": {
237
+ "title": "The id of the action's related job step",
238
+ "type": "integer"
239
+ },
240
+ "delay_after": {"title": "Delay after in seconds", "type": "integer"},
241
+ "object": {
242
+ "title": "Object",
243
+ "$ref": "#/definitions/noun"
244
+ },
245
+ "seconds": {
246
+ "title": "seconds",
247
+ "type": "integer",
248
+ "minimum": 10,
249
+ "maximum": 3600
250
+ },
251
+ "visibility": {
252
+ "title": "Is the element visible?",
253
+ "type": "boolean",
254
+ "enum": [true, false]
255
+ },
256
+ "conditional_blocks": {
257
+ "title": "Conditional Blocks",
258
+ "type": "object",
259
+ "description": "Structure for conditional blocks",
260
+ "properties": {
261
+ "conditional_passed": {
262
+ "title": "Conditional Passed",
263
+ "$ref": "#/definitions/conditional_block"
264
+ },
265
+ "conditional_failed": {
266
+ "title": "Conditional Failed",
267
+ "$ref": "#/definitions/conditional_block"
268
+ }
269
+ },
270
+ "additionalProperties": false,
271
+ "required": ["conditional_passed"]
272
+ }
273
+ },
274
+ "additionalProperties": false,
275
+ "required": ["action", "object", "visibility", "conditional_blocks"]
276
+ },
207
277
  "double_click": {
208
278
  "type": "object",
209
279
  "action_type": "action",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wisp-schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.0
4
+ version: 1.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Grodowski
@@ -83,6 +83,7 @@ files:
83
83
  - stable/actions/click.json
84
84
  - stable/actions/close_tab.json
85
85
  - stable/actions/comment.json
86
+ - stable/actions/conditional_observe.json
86
87
  - stable/actions/double_click.json
87
88
  - stable/actions/drag_and_drop.json
88
89
  - stable/actions/fill.json
@@ -98,6 +99,9 @@ files:
98
99
  - stable/actions/type.json
99
100
  - stable/actions/ui_element_reference.json
100
101
  - stable/actions/wait.json
102
+ - stable/blocks/conditional_block.json
103
+ - stable/embeddings/embedded_test.json
104
+ - stable/verbs.json
101
105
  - wisp.json
102
106
  homepage: https://github.com/rainforestapp/wisp
103
107
  licenses: