wisp-schema 1.1.0 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/canary-wisp.json +37 -3
- data/lib/version.rb +2 -2
- data/lib/wisp-schema.rb +34 -0
- data/stable/actions/click.json +27 -0
- data/stable/actions/close_tab.json +20 -0
- data/stable/actions/double_click.json +24 -0
- data/stable/actions/drag_and_drop.json +28 -0
- data/stable/actions/fill.json +25 -0
- data/stable/actions/hover.json +24 -0
- data/stable/actions/loaded.json +21 -0
- data/stable/actions/navigate.json +22 -0
- data/stable/actions/observe.json +29 -0
- data/stable/actions/refresh.json +20 -0
- data/stable/actions/scroll.json +25 -0
- data/stable/actions/select.json +28 -0
- data/stable/actions/send_key.json +22 -0
- data/stable/actions/tester_confirmation.json +21 -0
- data/stable/actions/tester_instruction.json +21 -0
- data/stable/actions/type.json +21 -0
- data/stable/actions/ui_element_reference.json +14 -0
- data/stable/actions/wait.json +22 -0
- data/wisp.json +37 -3
- metadata +19 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea6514e4fd27c79b345868d52c989a83054abf949b7df313a935b2908ffe6a62
|
|
4
|
+
data.tar.gz: bfad055fa66994e843cc4f2dc0e89268b3a1e9ccf2f5a7f5390f25f31000bae3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 936a851caa72f6e98ee1cec70ce1573e1af2f04e6508875522007ebee906b1c49d7ed68943ec2ee1f901888a992963f333cbb0f1c02c26cd3e3a73636bcb6f48
|
|
7
|
+
data.tar.gz: 5a531d93b9f064d27729266f5258e62fd87ab7c0683a21663302ab46a09ee6e47fe0578b78182605eeb54b7025e822fb5b47ee8c3b821dd4da6d5601502508b8
|
data/canary-wisp.json
CHANGED
|
@@ -91,6 +91,8 @@
|
|
|
91
91
|
"enum": ["click"]
|
|
92
92
|
},
|
|
93
93
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
94
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
95
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
94
96
|
"target": {
|
|
95
97
|
"title": "Target",
|
|
96
98
|
"$ref": "#/definitions/noun",
|
|
@@ -106,13 +108,15 @@
|
|
|
106
108
|
"double_click": {
|
|
107
109
|
"type": "object",
|
|
108
110
|
"action_type": "action",
|
|
109
|
-
"title": "Double
|
|
111
|
+
"title": "Double-click",
|
|
110
112
|
"description": "Double-clicks on the UI element",
|
|
111
113
|
"properties": {
|
|
112
114
|
"action": {
|
|
113
115
|
"enum": ["double_click"]
|
|
114
116
|
},
|
|
115
117
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
118
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
119
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
116
120
|
"target": {
|
|
117
121
|
"title": "Target",
|
|
118
122
|
"$ref": "#/definitions/noun",
|
|
@@ -132,6 +136,8 @@
|
|
|
132
136
|
"enum": ["fill"]
|
|
133
137
|
},
|
|
134
138
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
139
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
140
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
135
141
|
"target": {
|
|
136
142
|
"title": "Target",
|
|
137
143
|
"$ref": "#/definitions/noun",
|
|
@@ -152,6 +158,8 @@
|
|
|
152
158
|
"enum": ["type"]
|
|
153
159
|
},
|
|
154
160
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
161
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
162
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
155
163
|
"text": {"title": "Text", "type": "string"}
|
|
156
164
|
},
|
|
157
165
|
"additionalProperties": false,
|
|
@@ -167,6 +175,8 @@
|
|
|
167
175
|
"enum": ["send_key"]
|
|
168
176
|
},
|
|
169
177
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
178
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
179
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
170
180
|
"key": {"title": "Key", "type": "string"},
|
|
171
181
|
"modifier": {"title": "Modifier", "type": "string"}
|
|
172
182
|
},
|
|
@@ -183,6 +193,8 @@
|
|
|
183
193
|
"enum": ["hover"]
|
|
184
194
|
},
|
|
185
195
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
196
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
197
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
186
198
|
"target": {
|
|
187
199
|
"title": "Target",
|
|
188
200
|
"$ref": "#/definitions/noun",
|
|
@@ -202,6 +214,8 @@
|
|
|
202
214
|
"enum": ["select"]
|
|
203
215
|
},
|
|
204
216
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
217
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
218
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
205
219
|
"target": {
|
|
206
220
|
"title": "Target",
|
|
207
221
|
"$ref": "#/definitions/noun",
|
|
@@ -224,7 +238,9 @@
|
|
|
224
238
|
"action": {
|
|
225
239
|
"enum": ["refresh"]
|
|
226
240
|
},
|
|
227
|
-
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"}
|
|
241
|
+
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
242
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
243
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"}
|
|
228
244
|
},
|
|
229
245
|
"additionalProperties": false,
|
|
230
246
|
"required": ["action"]
|
|
@@ -239,6 +255,8 @@
|
|
|
239
255
|
"enum": ["navigate"]
|
|
240
256
|
},
|
|
241
257
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
258
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
259
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
242
260
|
"url": {"title": "URL", "type": "string"},
|
|
243
261
|
"tab": {"title": "Tab", "type": "string", "enum": ["current", "new", "incognito"]}
|
|
244
262
|
},
|
|
@@ -254,7 +272,9 @@
|
|
|
254
272
|
"action": {
|
|
255
273
|
"enum": ["close_tab"]
|
|
256
274
|
},
|
|
257
|
-
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"}
|
|
275
|
+
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
276
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
277
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"}
|
|
258
278
|
},
|
|
259
279
|
"additionalProperties": false,
|
|
260
280
|
"required": ["action"]
|
|
@@ -269,6 +289,8 @@
|
|
|
269
289
|
"enum": ["scroll"]
|
|
270
290
|
},
|
|
271
291
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
292
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
293
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
272
294
|
"direction": {"title": "Direction", "type": "string", "enum": ["up", "down", "left", "right"]},
|
|
273
295
|
"target": {
|
|
274
296
|
"title": "Target",
|
|
@@ -289,6 +311,8 @@
|
|
|
289
311
|
"enum": ["wait"]
|
|
290
312
|
},
|
|
291
313
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
314
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
315
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
292
316
|
"seconds": {"title": "seconds", "type": "integer"}
|
|
293
317
|
},
|
|
294
318
|
"additionalProperties": false,
|
|
@@ -304,6 +328,8 @@
|
|
|
304
328
|
"enum": ["drag_and_drop"]
|
|
305
329
|
},
|
|
306
330
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
331
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
332
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
307
333
|
"object": {
|
|
308
334
|
"title": "Object",
|
|
309
335
|
"$ref": "#/definitions/noun"
|
|
@@ -344,6 +370,8 @@
|
|
|
344
370
|
"enum": ["tester_instruction"]
|
|
345
371
|
},
|
|
346
372
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
373
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
374
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
347
375
|
"instruction": {"title": "Instruction", "type": "string"}
|
|
348
376
|
},
|
|
349
377
|
"additionalProperties": false,
|
|
@@ -359,6 +387,8 @@
|
|
|
359
387
|
"enum": ["observe"]
|
|
360
388
|
},
|
|
361
389
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
390
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
391
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
362
392
|
"object": {
|
|
363
393
|
"title": "Object",
|
|
364
394
|
"$ref": "#/definitions/noun"
|
|
@@ -382,6 +412,8 @@
|
|
|
382
412
|
"enum": ["loaded"]
|
|
383
413
|
},
|
|
384
414
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
415
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
416
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
385
417
|
"page": {"title": "Page", "type": "string"}
|
|
386
418
|
},
|
|
387
419
|
"additionalProperties": false,
|
|
@@ -397,6 +429,8 @@
|
|
|
397
429
|
"enum": ["tester_confirmation"]
|
|
398
430
|
},
|
|
399
431
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
432
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
433
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
400
434
|
"confirmation": {"title": "confirmation", "type": "string"}
|
|
401
435
|
},
|
|
402
436
|
"additionalProperties": false,
|
data/lib/version.rb
CHANGED
data/lib/wisp-schema.rb
CHANGED
|
@@ -4,12 +4,35 @@ require 'semantic'
|
|
|
4
4
|
require_relative 'version'
|
|
5
5
|
|
|
6
6
|
module Wisp
|
|
7
|
+
class NotSupportedAction < StandardError
|
|
8
|
+
end
|
|
9
|
+
|
|
7
10
|
SCHEMA_PATH = File.expand_path('../wisp.json', __dir__)
|
|
8
11
|
NOUNS_PATH = File.expand_path('../nouns.json', __dir__)
|
|
9
12
|
|
|
10
13
|
CANARY_SCHEMA_PATH = File.expand_path('../canary-wisp.json', __dir__)
|
|
11
14
|
CANARY_NOUNS_PATH = File.expand_path('../canary-nouns.json', __dir__)
|
|
12
15
|
|
|
16
|
+
ACTIONS = [
|
|
17
|
+
"click",
|
|
18
|
+
"close_tab",
|
|
19
|
+
"double_click",
|
|
20
|
+
"drag_and_drop",
|
|
21
|
+
"fill",
|
|
22
|
+
"hover",
|
|
23
|
+
"loaded",
|
|
24
|
+
"navigate",
|
|
25
|
+
"observe",
|
|
26
|
+
"refresh",
|
|
27
|
+
"scroll",
|
|
28
|
+
"select",
|
|
29
|
+
"send_key",
|
|
30
|
+
"tester_confirmation",
|
|
31
|
+
"tester_instruction",
|
|
32
|
+
"type",
|
|
33
|
+
"wait",
|
|
34
|
+
].freeze
|
|
35
|
+
|
|
13
36
|
SEMANTIC_STABLE_VERSION = Semantic::Version.new(STABLE_VERSION)
|
|
14
37
|
|
|
15
38
|
def is_canary?(raw_version)
|
|
@@ -34,4 +57,15 @@ module Wisp
|
|
|
34
57
|
end
|
|
35
58
|
end
|
|
36
59
|
module_function :nouns_schemer
|
|
60
|
+
|
|
61
|
+
def action_schemer(raw_version, action)
|
|
62
|
+
raise NotSupportedAction unless ACTIONS.include?(action)
|
|
63
|
+
|
|
64
|
+
if is_canary?(raw_version)
|
|
65
|
+
JSONSchemer.schema(Pathname.new(File.expand_path("../canary/actions/#{action}.json", __dir__)))
|
|
66
|
+
else
|
|
67
|
+
JSONSchemer.schema(Pathname.new(File.expand_path("../stable/actions/#{action}.json", __dir__)))
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
module_function :action_schemer
|
|
37
71
|
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "action",
|
|
5
|
+
"title": "Click",
|
|
6
|
+
"description": "Clicks on the UI element",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["click"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"target": {
|
|
14
|
+
"title": "Target",
|
|
15
|
+
"$ref": "ui_element_reference.json"
|
|
16
|
+
},
|
|
17
|
+
"button": {"title": "Mouse Button", "type": "string", "enum": ["left", "middle", "right"]},
|
|
18
|
+
"hold": {"title": "And Hold", "type": "boolean"},
|
|
19
|
+
"hold_seconds": {"title": "Hold seconds", "type": "integer"},
|
|
20
|
+
"version": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"title": "Version"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["action", "target", "button", "hold", "version"]
|
|
27
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "action",
|
|
5
|
+
"title": "Close Tab",
|
|
6
|
+
"description": "Closes current browser tab",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["close_tab"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"version": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"title": "Version"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": ["action", "version"]
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "action",
|
|
5
|
+
"title": "Double-click",
|
|
6
|
+
"description": "Double-clicks on the UI element",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["double_click"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"target": {
|
|
14
|
+
"title": "Target",
|
|
15
|
+
"$ref": "ui_element_reference.json"
|
|
16
|
+
},
|
|
17
|
+
"version": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"title": "Version"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["action", "target", "version"]
|
|
24
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "action",
|
|
5
|
+
"title": "Drag and drop",
|
|
6
|
+
"description": "Drag and drop",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["drag_and_drop"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"object": {
|
|
14
|
+
"title": "Object",
|
|
15
|
+
"$ref": "ui_element_reference.json"
|
|
16
|
+
},
|
|
17
|
+
"target": {
|
|
18
|
+
"title": "Target",
|
|
19
|
+
"$ref": "ui_element_reference.json"
|
|
20
|
+
},
|
|
21
|
+
"version": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"title": "Version"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"required": ["action", "target", "object", "version"]
|
|
28
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "action",
|
|
5
|
+
"title": "Fill",
|
|
6
|
+
"description": "Fills the text field with specified content",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["fill"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"target": {
|
|
14
|
+
"title": "Target",
|
|
15
|
+
"$ref": "ui_element_reference.json"
|
|
16
|
+
},
|
|
17
|
+
"text": {"title": "Text", "type": "string"},
|
|
18
|
+
"version": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"title": "Version"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": false,
|
|
24
|
+
"required": ["action", "target", "text", "version"]
|
|
25
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "action",
|
|
5
|
+
"title": "Hover",
|
|
6
|
+
"description": "Hovers over specified element",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["hover"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"target": {
|
|
14
|
+
"title": "Target",
|
|
15
|
+
"$ref": "ui_element_reference.json"
|
|
16
|
+
},
|
|
17
|
+
"version": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"title": "Version"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["action", "target", "version"]
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "assertion",
|
|
5
|
+
"title": "Loaded",
|
|
6
|
+
"description": "Checks if specified page has loaded",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["loaded"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"page": {"title": "Page", "type": "string"},
|
|
14
|
+
"version": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"title": "Version"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["action", "page", "version"]
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "action",
|
|
5
|
+
"title": "Navigate",
|
|
6
|
+
"description": "Navigates to specified URL",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["navigate"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"url": {"title": "URL", "type": "string"},
|
|
14
|
+
"tab": {"title": "Tab", "type": "string", "enum": ["current", "new", "incognito"]},
|
|
15
|
+
"version": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"title": "Version"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": ["action", "url", "tab", "version"]
|
|
22
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "assertion",
|
|
5
|
+
"title": "Observe",
|
|
6
|
+
"description": "Checks if element of the UI is visible or not",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["observe"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"object": {
|
|
14
|
+
"title": "Object",
|
|
15
|
+
"$ref": "ui_element_reference.json"
|
|
16
|
+
},
|
|
17
|
+
"visibility": {
|
|
18
|
+
"title": "Is the element visible?",
|
|
19
|
+
"type": "boolean",
|
|
20
|
+
"enum": [true, false]
|
|
21
|
+
},
|
|
22
|
+
"version": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"title": "Version"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": ["action", "object", "visibility", "version"]
|
|
29
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "action",
|
|
5
|
+
"title": "refresh",
|
|
6
|
+
"description": "refreshes the webpage",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["refresh"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"version": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"title": "Version"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"additionalproperties": false,
|
|
19
|
+
"required": ["action", "version"]
|
|
20
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "action",
|
|
5
|
+
"title": "Scroll",
|
|
6
|
+
"description": "Scrolls the page into specified direction until target is reached",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["scroll"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"direction": {"title": "Direction", "type": "string", "enum": ["up", "down", "left", "right"]},
|
|
14
|
+
"target": {
|
|
15
|
+
"title": "Target",
|
|
16
|
+
"$ref": "ui_element_reference.json"
|
|
17
|
+
},
|
|
18
|
+
"version": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"title": "Version"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": false,
|
|
24
|
+
"required": ["action", "direction", "target", "version"]
|
|
25
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "action",
|
|
5
|
+
"title": "Select",
|
|
6
|
+
"description": "Selects specified item from the dropdown",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["select"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"target": {
|
|
14
|
+
"title": "Target",
|
|
15
|
+
"$ref": "ui_element_reference.json"
|
|
16
|
+
},
|
|
17
|
+
"option": {
|
|
18
|
+
"title": "Option",
|
|
19
|
+
"$ref": "ui_element_reference.json"
|
|
20
|
+
},
|
|
21
|
+
"version": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"title": "Version"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"required": ["action", "target", "option", "version"]
|
|
28
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "action",
|
|
5
|
+
"title": "Press Key",
|
|
6
|
+
"description": "Press specified key or key combination.",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["send_key"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"key": {"title": "Key", "type": "string"},
|
|
14
|
+
"modifier": {"title": "Modifier", "type": "string"},
|
|
15
|
+
"version": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"title": "Version"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": ["action", "key", "version"]
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "assertion",
|
|
5
|
+
"title": "Tester Confirmation",
|
|
6
|
+
"description": "Ask a question to confirm a behavior",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["tester_confirmation"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"confirmation": {"title": "confirmation", "type": "string"},
|
|
14
|
+
"version": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"title": "Version"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["action", "confirmation", "version"]
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "action",
|
|
5
|
+
"title": "Tester Instruction",
|
|
6
|
+
"description": "An action for a human to complete",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["tester_instruction"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"instruction": {"title": "Instruction", "type": "string"},
|
|
14
|
+
"version": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"title": "Version"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["action", "instruction", "version"]
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "action",
|
|
5
|
+
"title": "Type",
|
|
6
|
+
"description": "Types in specified text",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["type"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"text": {"title": "Text", "type": "string"},
|
|
14
|
+
"version": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"title": "Version"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["action", "text", "version"]
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "UI Element Reference",
|
|
5
|
+
"description": "A UI Element stored in the database",
|
|
6
|
+
"properties": {
|
|
7
|
+
"type": {
|
|
8
|
+
"enum": ["ui_element_reference"]
|
|
9
|
+
},
|
|
10
|
+
"id": {"title": "UI Element ID", "type": "integer"}
|
|
11
|
+
},
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": ["type", "id"]
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"action_type": "action",
|
|
5
|
+
"title": "Wait",
|
|
6
|
+
"description": "Waits for a number of seconds",
|
|
7
|
+
"properties": {
|
|
8
|
+
"action": {
|
|
9
|
+
"enum": ["wait"]
|
|
10
|
+
},
|
|
11
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
12
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
13
|
+
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
14
|
+
"seconds": {"title": "seconds", "type": "integer"},
|
|
15
|
+
"version": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"title": "Version"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": ["action", "seconds", "version"]
|
|
22
|
+
}
|
data/wisp.json
CHANGED
|
@@ -91,6 +91,8 @@
|
|
|
91
91
|
"enum": ["click"]
|
|
92
92
|
},
|
|
93
93
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
94
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
95
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
94
96
|
"target": {
|
|
95
97
|
"title": "Target",
|
|
96
98
|
"$ref": "#/definitions/noun",
|
|
@@ -106,13 +108,15 @@
|
|
|
106
108
|
"double_click": {
|
|
107
109
|
"type": "object",
|
|
108
110
|
"action_type": "action",
|
|
109
|
-
"title": "Double
|
|
111
|
+
"title": "Double-click",
|
|
110
112
|
"description": "Double-clicks on the UI element",
|
|
111
113
|
"properties": {
|
|
112
114
|
"action": {
|
|
113
115
|
"enum": ["double_click"]
|
|
114
116
|
},
|
|
115
117
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
118
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
119
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
116
120
|
"target": {
|
|
117
121
|
"title": "Target",
|
|
118
122
|
"$ref": "#/definitions/noun",
|
|
@@ -132,6 +136,8 @@
|
|
|
132
136
|
"enum": ["fill"]
|
|
133
137
|
},
|
|
134
138
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
139
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
140
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
135
141
|
"target": {
|
|
136
142
|
"title": "Target",
|
|
137
143
|
"$ref": "#/definitions/noun",
|
|
@@ -152,6 +158,8 @@
|
|
|
152
158
|
"enum": ["type"]
|
|
153
159
|
},
|
|
154
160
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
161
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
162
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
155
163
|
"text": {"title": "Text", "type": "string"}
|
|
156
164
|
},
|
|
157
165
|
"additionalProperties": false,
|
|
@@ -167,6 +175,8 @@
|
|
|
167
175
|
"enum": ["send_key"]
|
|
168
176
|
},
|
|
169
177
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
178
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
179
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
170
180
|
"key": {"title": "Key", "type": "string"},
|
|
171
181
|
"modifier": {"title": "Modifier", "type": "string"}
|
|
172
182
|
},
|
|
@@ -183,6 +193,8 @@
|
|
|
183
193
|
"enum": ["hover"]
|
|
184
194
|
},
|
|
185
195
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
196
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
197
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
186
198
|
"target": {
|
|
187
199
|
"title": "Target",
|
|
188
200
|
"$ref": "#/definitions/noun",
|
|
@@ -202,6 +214,8 @@
|
|
|
202
214
|
"enum": ["select"]
|
|
203
215
|
},
|
|
204
216
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
217
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
218
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
205
219
|
"target": {
|
|
206
220
|
"title": "Target",
|
|
207
221
|
"$ref": "#/definitions/noun",
|
|
@@ -224,7 +238,9 @@
|
|
|
224
238
|
"action": {
|
|
225
239
|
"enum": ["refresh"]
|
|
226
240
|
},
|
|
227
|
-
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"}
|
|
241
|
+
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
242
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
243
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"}
|
|
228
244
|
},
|
|
229
245
|
"additionalProperties": false,
|
|
230
246
|
"required": ["action"]
|
|
@@ -239,6 +255,8 @@
|
|
|
239
255
|
"enum": ["navigate"]
|
|
240
256
|
},
|
|
241
257
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
258
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
259
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
242
260
|
"url": {"title": "URL", "type": "string"},
|
|
243
261
|
"tab": {"title": "Tab", "type": "string", "enum": ["current", "new", "incognito"]}
|
|
244
262
|
},
|
|
@@ -254,7 +272,9 @@
|
|
|
254
272
|
"action": {
|
|
255
273
|
"enum": ["close_tab"]
|
|
256
274
|
},
|
|
257
|
-
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"}
|
|
275
|
+
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
276
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
277
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"}
|
|
258
278
|
},
|
|
259
279
|
"additionalProperties": false,
|
|
260
280
|
"required": ["action"]
|
|
@@ -269,6 +289,8 @@
|
|
|
269
289
|
"enum": ["scroll"]
|
|
270
290
|
},
|
|
271
291
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
292
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
293
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
272
294
|
"direction": {"title": "Direction", "type": "string", "enum": ["up", "down", "left", "right"]},
|
|
273
295
|
"target": {
|
|
274
296
|
"title": "Target",
|
|
@@ -289,6 +311,8 @@
|
|
|
289
311
|
"enum": ["wait"]
|
|
290
312
|
},
|
|
291
313
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
314
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
315
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
292
316
|
"seconds": {"title": "seconds", "type": "integer"}
|
|
293
317
|
},
|
|
294
318
|
"additionalProperties": false,
|
|
@@ -304,6 +328,8 @@
|
|
|
304
328
|
"enum": ["drag_and_drop"]
|
|
305
329
|
},
|
|
306
330
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
331
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
332
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
307
333
|
"object": {
|
|
308
334
|
"title": "Object",
|
|
309
335
|
"$ref": "#/definitions/noun"
|
|
@@ -344,6 +370,8 @@
|
|
|
344
370
|
"enum": ["tester_instruction"]
|
|
345
371
|
},
|
|
346
372
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
373
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
374
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
347
375
|
"instruction": {"title": "Instruction", "type": "string"}
|
|
348
376
|
},
|
|
349
377
|
"additionalProperties": false,
|
|
@@ -359,6 +387,8 @@
|
|
|
359
387
|
"enum": ["observe"]
|
|
360
388
|
},
|
|
361
389
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
390
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
391
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
362
392
|
"object": {
|
|
363
393
|
"title": "Object",
|
|
364
394
|
"$ref": "#/definitions/noun"
|
|
@@ -382,6 +412,8 @@
|
|
|
382
412
|
"enum": ["loaded"]
|
|
383
413
|
},
|
|
384
414
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
415
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
416
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
385
417
|
"page": {"title": "Page", "type": "string"}
|
|
386
418
|
},
|
|
387
419
|
"additionalProperties": false,
|
|
@@ -397,6 +429,8 @@
|
|
|
397
429
|
"enum": ["tester_confirmation"]
|
|
398
430
|
},
|
|
399
431
|
"embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
|
|
432
|
+
"id": {"title": "Action ID", "type": "integer"},
|
|
433
|
+
"delay_after": {"title": "Delay after in seconds", "type": "integer"},
|
|
400
434
|
"confirmation": {"title": "confirmation", "type": "string"}
|
|
401
435
|
},
|
|
402
436
|
"additionalProperties": false,
|
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.
|
|
4
|
+
version: 1.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jan Grodowski
|
|
@@ -51,6 +51,24 @@ files:
|
|
|
51
51
|
- lib/version.rb
|
|
52
52
|
- lib/wisp-schema.rb
|
|
53
53
|
- nouns.json
|
|
54
|
+
- stable/actions/click.json
|
|
55
|
+
- stable/actions/close_tab.json
|
|
56
|
+
- stable/actions/double_click.json
|
|
57
|
+
- stable/actions/drag_and_drop.json
|
|
58
|
+
- stable/actions/fill.json
|
|
59
|
+
- stable/actions/hover.json
|
|
60
|
+
- stable/actions/loaded.json
|
|
61
|
+
- stable/actions/navigate.json
|
|
62
|
+
- stable/actions/observe.json
|
|
63
|
+
- stable/actions/refresh.json
|
|
64
|
+
- stable/actions/scroll.json
|
|
65
|
+
- stable/actions/select.json
|
|
66
|
+
- stable/actions/send_key.json
|
|
67
|
+
- stable/actions/tester_confirmation.json
|
|
68
|
+
- stable/actions/tester_instruction.json
|
|
69
|
+
- stable/actions/type.json
|
|
70
|
+
- stable/actions/ui_element_reference.json
|
|
71
|
+
- stable/actions/wait.json
|
|
54
72
|
- wisp.json
|
|
55
73
|
homepage: https://github.com/rainforestapp/wisp
|
|
56
74
|
licenses:
|