wisp-schema 1.0.2 → 1.1.0

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: 7d0b3c8aafbec709cee5e5224702f63d4b87f5b075817b657bc5967c3ccc892f
4
- data.tar.gz: 4bf671093aea5f59d080fd277a57d660d53568e90f918e2d107e58b59819b86c
3
+ metadata.gz: f0c8732f37998ef5c639aa803b1f5e186a67331c3ddaceb36a4796ef64b0664f
4
+ data.tar.gz: 4aa969b7b910bf7c3d21dd9732e7f2b13a3b1f3184bc8e120d2aa5780f080476
5
5
  SHA512:
6
- metadata.gz: 4e3b58dfe8c0932f9e3c56339e0d3db5f06329d2c3a78741f0dd54f176c7834b4b6dd3de973d14aa150e1f3e1a48a003a07723d38937aeabc3fa1f44b8326eb1
7
- data.tar.gz: 1c5e0d725380d01332147b30e1bc28dc97eed7023d08a33628becd4098e5c47679911482c91d46e237fd947839db94e1be0df0f5192b63ad97a00242b7e25050
6
+ metadata.gz: e980638064848368e57a7a213c86c4eb3b2406af683e328e1a84fd2ecb03a26878cb169f91619a52534694d4e63ef0aa6c8e0861900359f07d873c21178def42
7
+ data.tar.gz: 37ec22aaaf9c2babe247ed02ae5696e080ed641b9e4000a44fd0fe0baa949d19d8ef568a898e76bb2e80842ca795ef76978ffed8cc6c5500d3896c18b0852102
data/canary-wisp.json CHANGED
@@ -77,11 +77,13 @@
77
77
  {"$ref": "#/definitions/tester_instruction"},
78
78
  {"$ref": "#/definitions/embedded_test"},
79
79
  {"$ref": "#/definitions/observe"},
80
+ {"$ref": "#/definitions/loaded"},
80
81
  {"$ref": "#/definitions/tester_confirmation"}
81
82
  ]
82
83
  },
83
84
  "click": {
84
85
  "type": "object",
86
+ "action_type": "action",
85
87
  "title": "Click",
86
88
  "description": "Clicks on the UI element",
87
89
  "properties": {
@@ -91,7 +93,8 @@
91
93
  "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
92
94
  "target": {
93
95
  "title": "Target",
94
- "$ref": "#/definitions/noun"
96
+ "$ref": "#/definitions/noun",
97
+ "type": "ui_element_reference"
95
98
  },
96
99
  "button": {"title": "Mouse Button", "type": "string", "enum": ["left", "middle", "right"]},
97
100
  "hold": {"title": "And Hold", "type": "boolean"},
@@ -102,6 +105,7 @@
102
105
  },
103
106
  "double_click": {
104
107
  "type": "object",
108
+ "action_type": "action",
105
109
  "title": "Double Click",
106
110
  "description": "Double-clicks on the UI element",
107
111
  "properties": {
@@ -111,7 +115,8 @@
111
115
  "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
112
116
  "target": {
113
117
  "title": "Target",
114
- "$ref": "#/definitions/noun"
118
+ "$ref": "#/definitions/noun",
119
+ "type": "ui_element_reference"
115
120
  }
116
121
  },
117
122
  "additionalProperties": false,
@@ -119,6 +124,7 @@
119
124
  },
120
125
  "fill": {
121
126
  "type": "object",
127
+ "action_type": "action",
122
128
  "title": "Fill",
123
129
  "description": "Fills the text field with specified content",
124
130
  "properties": {
@@ -128,7 +134,8 @@
128
134
  "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
129
135
  "target": {
130
136
  "title": "Target",
131
- "$ref": "#/definitions/noun"
137
+ "$ref": "#/definitions/noun",
138
+ "type": "ui_element_reference"
132
139
  },
133
140
  "text": {"title": "Text", "type": "string"}
134
141
  },
@@ -137,6 +144,7 @@
137
144
  },
138
145
  "type": {
139
146
  "type": "object",
147
+ "action_type": "action",
140
148
  "title": "Type",
141
149
  "description": "Types in specified text",
142
150
  "properties": {
@@ -151,6 +159,7 @@
151
159
  },
152
160
  "send_key": {
153
161
  "type": "object",
162
+ "action_type": "action",
154
163
  "title": "Press Key",
155
164
  "description": "Press specified key or key combination.",
156
165
  "properties": {
@@ -166,6 +175,7 @@
166
175
  },
167
176
  "hover": {
168
177
  "type": "object",
178
+ "action_type": "action",
169
179
  "title": "Hover",
170
180
  "description": "Hovers over specified element",
171
181
  "properties": {
@@ -175,7 +185,8 @@
175
185
  "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
176
186
  "target": {
177
187
  "title": "Target",
178
- "$ref": "#/definitions/noun"
188
+ "$ref": "#/definitions/noun",
189
+ "type": "ui_element_reference"
179
190
  }
180
191
  },
181
192
  "additionalProperties": false,
@@ -183,6 +194,7 @@
183
194
  },
184
195
  "select": {
185
196
  "type": "object",
197
+ "action_type": "action",
186
198
  "title": "Select",
187
199
  "description": "Selects specified item from the dropdown",
188
200
  "properties": {
@@ -192,7 +204,8 @@
192
204
  "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
193
205
  "target": {
194
206
  "title": "Target",
195
- "$ref": "#/definitions/noun"
207
+ "$ref": "#/definitions/noun",
208
+ "type": "ui_element_reference"
196
209
  },
197
210
  "option": {
198
211
  "title": "Option",
@@ -204,6 +217,7 @@
204
217
  },
205
218
  "refresh": {
206
219
  "type": "object",
220
+ "action_type": "action",
207
221
  "title": "Refresh",
208
222
  "description": "Refreshes the webpage",
209
223
  "properties": {
@@ -217,6 +231,7 @@
217
231
  },
218
232
  "navigate": {
219
233
  "type": "object",
234
+ "action_type": "action",
220
235
  "title": "Navigate",
221
236
  "description": "Navigates to specified URL",
222
237
  "properties": {
@@ -232,6 +247,7 @@
232
247
  },
233
248
  "close_tab": {
234
249
  "type": "object",
250
+ "action_type": "action",
235
251
  "title": "Close Tab",
236
252
  "description": "Closes current browser tab",
237
253
  "properties": {
@@ -245,6 +261,7 @@
245
261
  },
246
262
  "scroll": {
247
263
  "type": "object",
264
+ "action_type": "action",
248
265
  "title": "Scroll",
249
266
  "description": "Scrolls the page into specified direction until target is reached",
250
267
  "properties": {
@@ -255,7 +272,8 @@
255
272
  "direction": {"title": "Direction", "type": "string", "enum": ["up", "down", "left", "right"]},
256
273
  "target": {
257
274
  "title": "Target",
258
- "$ref": "#/definitions/noun"
275
+ "$ref": "#/definitions/noun",
276
+ "type": "ui_element_reference"
259
277
  }
260
278
  },
261
279
  "additionalProperties": false,
@@ -263,6 +281,7 @@
263
281
  },
264
282
  "wait": {
265
283
  "type": "object",
284
+ "action_type": "action",
266
285
  "title": "Wait",
267
286
  "description": "Waits for a number of seconds",
268
287
  "properties": {
@@ -277,6 +296,7 @@
277
296
  },
278
297
  "drag_and_drop": {
279
298
  "type": "object",
299
+ "action_type": "action",
280
300
  "title": "Drag and drop",
281
301
  "description": "Drag and drop",
282
302
  "properties": {
@@ -290,7 +310,8 @@
290
310
  },
291
311
  "target": {
292
312
  "title": "Target",
293
- "$ref": "#/definitions/noun"
313
+ "$ref": "#/definitions/noun",
314
+ "type": "ui_element_reference"
294
315
  }
295
316
  },
296
317
  "additionalProperties": false,
@@ -298,6 +319,7 @@
298
319
  },
299
320
  "embedded_test": {
300
321
  "type": "object",
322
+ "action_type": "embedded_test",
301
323
  "title": "Embedded Test",
302
324
  "description": "Embeds a Test",
303
325
  "properties": {
@@ -314,6 +336,7 @@
314
336
  },
315
337
  "tester_instruction": {
316
338
  "type": "object",
339
+ "action_type": "action",
317
340
  "title": "Tester Instruction",
318
341
  "description": "An action for a human to complete",
319
342
  "properties": {
@@ -328,10 +351,11 @@
328
351
  },
329
352
  "observe": {
330
353
  "type": "object",
354
+ "action_type": "assertion",
331
355
  "title": "Observe",
332
356
  "description": "Checks if element of the UI is visible or not",
333
357
  "properties": {
334
- "assertion": {
358
+ "action": {
335
359
  "enum": ["observe"]
336
360
  },
337
361
  "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
@@ -339,24 +363,44 @@
339
363
  "title": "Object",
340
364
  "$ref": "#/definitions/noun"
341
365
  },
342
- "visibility": {"title": "Is the element visible?", "type": "boolean"}
366
+ "visibility": {
367
+ "title": "Is the element visible?",
368
+ "type": "boolean",
369
+ "enum": [true, false]
370
+ }
371
+ },
372
+ "additionalProperties": false,
373
+ "required": ["action", "object", "visibility"]
374
+ },
375
+ "loaded": {
376
+ "type": "object",
377
+ "action_type": "assertion",
378
+ "title": "Loaded",
379
+ "description": "Checks if specified page has loaded",
380
+ "properties": {
381
+ "action": {
382
+ "enum": ["loaded"]
383
+ },
384
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
385
+ "page": {"title": "Page", "type": "string"}
343
386
  },
344
387
  "additionalProperties": false,
345
- "required": ["assertion", "object"]
388
+ "required": ["action", "page"]
346
389
  },
347
390
  "tester_confirmation": {
348
391
  "type": "object",
392
+ "action_type": "assertion",
349
393
  "title": "Tester Confirmation",
350
394
  "description": "Ask a question to confirm a behavior",
351
395
  "properties": {
352
- "assertion": {
396
+ "action": {
353
397
  "enum": ["tester_confirmation"]
354
398
  },
355
399
  "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
356
400
  "confirmation": {"title": "confirmation", "type": "string"}
357
401
  },
358
402
  "additionalProperties": false,
359
- "required": ["assertion", "confirmation"]
403
+ "required": ["action", "confirmation"]
360
404
  }
361
405
  },
362
406
  "type": "object",
data/lib/version.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wisp
4
- VERSION = '1.0.2'
5
- STABLE_VERSION = '0.18.1'
4
+ VERSION = '1.1.0'
5
+ STABLE_VERSION = '1.1.0'
6
+ CANARY_VERSION = '2.0.0'
6
7
  end
data/lib/wisp-schema.rb CHANGED
@@ -12,10 +12,13 @@ module Wisp
12
12
 
13
13
  SEMANTIC_STABLE_VERSION = Semantic::Version.new(STABLE_VERSION)
14
14
 
15
- def wisp_schemer(raw_version)
16
- version = Semantic::Version.new(raw_version)
15
+ def is_canary?(raw_version)
16
+ Semantic::Version.new(raw_version) > SEMANTIC_STABLE_VERSION
17
+ end
18
+ module_function :is_canary?
17
19
 
18
- if version > SEMANTIC_STABLE_VERSION
20
+ def wisp_schemer(raw_version)
21
+ if is_canary?(raw_version)
19
22
  JSONSchemer.schema(Pathname.new(Wisp::CANARY_SCHEMA_PATH))
20
23
  else
21
24
  JSONSchemer.schema(Pathname.new(Wisp::SCHEMA_PATH))
@@ -24,9 +27,7 @@ module Wisp
24
27
  module_function :wisp_schemer
25
28
 
26
29
  def nouns_schemer(raw_version)
27
- version = Semantic::Version.new(raw_version)
28
-
29
- if version > SEMANTIC_STABLE_VERSION
30
+ if is_canary?(raw_version)
30
31
  JSONSchemer.schema(Pathname.new(Wisp::CANARY_NOUNS_PATH))
31
32
  else
32
33
  JSONSchemer.schema(Pathname.new(Wisp::NOUNS_PATH))
data/wisp.json CHANGED
@@ -67,56 +67,56 @@
67
67
  {"$ref": "#/definitions/type"},
68
68
  {"$ref": "#/definitions/send_key"},
69
69
  {"$ref": "#/definitions/hover"},
70
- {"$ref": "#/definitions/dropdown_select"},
71
- {"$ref": "#/definitions/checkbox_check"},
72
- {"$ref": "#/definitions/checkbox_uncheck"},
70
+ {"$ref": "#/definitions/select"},
73
71
  {"$ref": "#/definitions/refresh"},
74
72
  {"$ref": "#/definitions/navigate"},
75
- {"$ref": "#/definitions/navigate_new_tab"},
76
- {"$ref": "#/definitions/navigate_incognito_tab"},
77
73
  {"$ref": "#/definitions/close_tab"},
78
74
  {"$ref": "#/definitions/scroll"},
79
- {"$ref": "#/definitions/sleep"},
75
+ {"$ref": "#/definitions/wait"},
80
76
  {"$ref": "#/definitions/drag_and_drop"},
81
- {"$ref": "#/definitions/click_and_hold"},
82
- {"$ref": "#/definitions/plain_language"},
83
- {"$ref": "#/definitions/custom_action"},
84
- {"$ref": "#/definitions/see"},
85
- {"$ref": "#/definitions/disappear"},
77
+ {"$ref": "#/definitions/tester_instruction"},
78
+ {"$ref": "#/definitions/embedded_test"},
79
+ {"$ref": "#/definitions/observe"},
86
80
  {"$ref": "#/definitions/loaded"},
87
- {"$ref": "#/definitions/plain_language_assertion"}
81
+ {"$ref": "#/definitions/tester_confirmation"}
88
82
  ]
89
83
  },
90
84
  "click": {
91
85
  "type": "object",
86
+ "action_type": "action",
92
87
  "title": "Click",
93
88
  "description": "Clicks on the UI element",
94
89
  "properties": {
95
90
  "action": {
96
91
  "enum": ["click"]
97
92
  },
98
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
93
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
99
94
  "target": {
100
95
  "title": "Target",
101
- "$ref": "#/definitions/noun"
96
+ "$ref": "#/definitions/noun",
97
+ "type": "ui_element_reference"
102
98
  },
103
- "button": {"title": "Mouse Button", "type": "string", "enum": ["left", "middle", "right"]}
99
+ "button": {"title": "Mouse Button", "type": "string", "enum": ["left", "middle", "right"]},
100
+ "hold": {"title": "And Hold", "type": "boolean"},
101
+ "hold_seconds": {"title": "Hold seconds", "type": "integer"}
104
102
  },
105
103
  "additionalProperties": false,
106
- "required": ["action", "target"]
104
+ "required": ["action", "target", "button", "hold"]
107
105
  },
108
106
  "double_click": {
109
107
  "type": "object",
108
+ "action_type": "action",
110
109
  "title": "Double Click",
111
110
  "description": "Double-clicks on the UI element",
112
111
  "properties": {
113
112
  "action": {
114
113
  "enum": ["double_click"]
115
114
  },
116
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
115
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
117
116
  "target": {
118
117
  "title": "Target",
119
- "$ref": "#/definitions/noun"
118
+ "$ref": "#/definitions/noun",
119
+ "type": "ui_element_reference"
120
120
  }
121
121
  },
122
122
  "additionalProperties": false,
@@ -124,47 +124,49 @@
124
124
  },
125
125
  "fill": {
126
126
  "type": "object",
127
+ "action_type": "action",
127
128
  "title": "Fill",
128
129
  "description": "Fills the text field with specified content",
129
130
  "properties": {
130
131
  "action": {
131
132
  "enum": ["fill"]
132
133
  },
133
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
134
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
134
135
  "target": {
135
136
  "title": "Target",
136
- "$ref": "#/definitions/noun"
137
+ "$ref": "#/definitions/noun",
138
+ "type": "ui_element_reference"
137
139
  },
138
- "text": {"title": "Text", "type": "string"},
139
- "method": { "title": "Text entry method", "type": "string", "enum": ["pasting", "typing"] }
140
+ "text": {"title": "Text", "type": "string"}
140
141
  },
141
142
  "additionalProperties": false,
142
143
  "required": ["action", "target", "text"]
143
144
  },
144
145
  "type": {
145
146
  "type": "object",
147
+ "action_type": "action",
146
148
  "title": "Type",
147
149
  "description": "Types in specified text",
148
150
  "properties": {
149
151
  "action": {
150
152
  "enum": ["type"]
151
153
  },
152
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
153
- "text": {"title": "Text", "type": "string"},
154
- "method": { "title": "Text entry method", "type": "string", "enum": ["pasting", "typing"] }
154
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
155
+ "text": {"title": "Text", "type": "string"}
155
156
  },
156
157
  "additionalProperties": false,
157
158
  "required": ["action", "text"]
158
159
  },
159
160
  "send_key": {
160
161
  "type": "object",
162
+ "action_type": "action",
161
163
  "title": "Press Key",
162
164
  "description": "Press specified key or key combination.",
163
165
  "properties": {
164
166
  "action": {
165
167
  "enum": ["send_key"]
166
168
  },
167
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
169
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
168
170
  "key": {"title": "Key", "type": "string"},
169
171
  "modifier": {"title": "Modifier", "type": "string"}
170
172
  },
@@ -173,33 +175,37 @@
173
175
  },
174
176
  "hover": {
175
177
  "type": "object",
178
+ "action_type": "action",
176
179
  "title": "Hover",
177
180
  "description": "Hovers over specified element",
178
181
  "properties": {
179
182
  "action": {
180
183
  "enum": ["hover"]
181
184
  },
182
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
185
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
183
186
  "target": {
184
187
  "title": "Target",
185
- "$ref": "#/definitions/noun"
188
+ "$ref": "#/definitions/noun",
189
+ "type": "ui_element_reference"
186
190
  }
187
191
  },
188
192
  "additionalProperties": false,
189
193
  "required": ["action", "target"]
190
194
  },
191
- "dropdown_select": {
195
+ "select": {
192
196
  "type": "object",
193
- "title": "Dropdown Select",
197
+ "action_type": "action",
198
+ "title": "Select",
194
199
  "description": "Selects specified item from the dropdown",
195
200
  "properties": {
196
201
  "action": {
197
- "enum": ["dropdown_select"]
202
+ "enum": ["select"]
198
203
  },
199
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
204
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
200
205
  "target": {
201
206
  "title": "Target",
202
- "$ref": "#/definitions/noun"
207
+ "$ref": "#/definitions/noun",
208
+ "type": "ui_element_reference"
203
209
  },
204
210
  "option": {
205
211
  "title": "Option",
@@ -209,135 +215,80 @@
209
215
  "additionalProperties": false,
210
216
  "required": ["action", "target", "option"]
211
217
  },
212
- "checkbox_check": {
213
- "type": "object",
214
- "title": "Checkbox Check",
215
- "description": "Checks specified checkbox",
216
- "properties": {
217
- "action": {
218
- "enum": ["checkbox_check"]
219
- },
220
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
221
- "target": {
222
- "title": "Target",
223
- "$ref": "#/definitions/noun"
224
- }
225
- },
226
- "additionalProperties": false,
227
- "required": ["action", "target"]
228
- },
229
- "checkbox_uncheck": {
230
- "type": "object",
231
- "title": "Checkbox Uncheck",
232
- "description": "Unchecks specified checkbox",
233
- "properties": {
234
- "action": {
235
- "enum": ["checkbox_uncheck"]
236
- },
237
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
238
- "target": {
239
- "title": "Target",
240
- "$ref": "#/definitions/noun"
241
- }
242
- },
243
- "additionalProperties": false,
244
- "required": ["action", "target"]
245
- },
246
218
  "refresh": {
247
219
  "type": "object",
220
+ "action_type": "action",
248
221
  "title": "Refresh",
249
222
  "description": "Refreshes the webpage",
250
223
  "properties": {
251
224
  "action": {
252
225
  "enum": ["refresh"]
253
226
  },
254
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"}
227
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"}
255
228
  },
256
229
  "additionalProperties": false,
257
230
  "required": ["action"]
258
231
  },
259
232
  "navigate": {
260
233
  "type": "object",
234
+ "action_type": "action",
261
235
  "title": "Navigate",
262
236
  "description": "Navigates to specified URL",
263
237
  "properties": {
264
238
  "action": {
265
239
  "enum": ["navigate"]
266
240
  },
267
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
268
- "url": {"title": "URL", "type": "string"}
269
- },
270
- "additionalProperties": false,
271
- "required": ["action", "url"]
272
- },
273
- "navigate_new_tab": {
274
- "type": "object",
275
- "title": "Navigate - New Tab",
276
- "description": "Navigates to specified URL in a new tab",
277
- "properties": {
278
- "action": {
279
- "enum": ["navigate_new_tab"]
280
- },
281
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
282
- "url": {"title": "URL", "type": "string"}
283
- },
284
- "additionalProperties": false,
285
- "required": ["action", "url"]
286
- },
287
- "navigate_incognito_tab": {
288
- "type": "object",
289
- "title": "Navigate - Incognito Tab",
290
- "description": "Navigates to specified URL in a new incognito tab",
291
- "properties": {
292
- "action": {
293
- "enum": ["navigate_incognito_tab"]
294
- },
295
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
296
- "url": {"title": "URL", "type": "string"}
241
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
242
+ "url": {"title": "URL", "type": "string"},
243
+ "tab": {"title": "Tab", "type": "string", "enum": ["current", "new", "incognito"]}
297
244
  },
298
245
  "additionalProperties": false,
299
- "required": ["action", "url"]
246
+ "required": ["action", "url", "tab"]
300
247
  },
301
248
  "close_tab": {
302
249
  "type": "object",
250
+ "action_type": "action",
303
251
  "title": "Close Tab",
304
252
  "description": "Closes current browser tab",
305
253
  "properties": {
306
254
  "action": {
307
255
  "enum": ["close_tab"]
308
256
  },
309
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"}
257
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"}
310
258
  },
311
259
  "additionalProperties": false,
312
260
  "required": ["action"]
313
261
  },
314
262
  "scroll": {
315
263
  "type": "object",
264
+ "action_type": "action",
316
265
  "title": "Scroll",
317
266
  "description": "Scrolls the page into specified direction until target is reached",
318
267
  "properties": {
319
268
  "action": {
320
269
  "enum": ["scroll"]
321
270
  },
322
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
271
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
323
272
  "direction": {"title": "Direction", "type": "string", "enum": ["up", "down", "left", "right"]},
324
273
  "target": {
325
274
  "title": "Target",
326
- "$ref": "#/definitions/noun"
275
+ "$ref": "#/definitions/noun",
276
+ "type": "ui_element_reference"
327
277
  }
328
278
  },
329
279
  "additionalProperties": false,
330
280
  "required": ["action", "direction", "target"]
331
281
  },
332
- "sleep": {
282
+ "wait": {
333
283
  "type": "object",
334
- "title": "Sleep",
284
+ "action_type": "action",
285
+ "title": "Wait",
335
286
  "description": "Waits for a number of seconds",
336
287
  "properties": {
337
288
  "action": {
338
- "enum": ["sleep"]
289
+ "enum": ["wait"]
339
290
  },
340
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
291
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
341
292
  "seconds": {"title": "seconds", "type": "integer"}
342
293
  },
343
294
  "additionalProperties": false,
@@ -345,50 +296,35 @@
345
296
  },
346
297
  "drag_and_drop": {
347
298
  "type": "object",
299
+ "action_type": "action",
348
300
  "title": "Drag and drop",
349
301
  "description": "Drag and drop",
350
302
  "properties": {
351
303
  "action": {
352
304
  "enum": ["drag_and_drop"]
353
305
  },
354
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
306
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
355
307
  "object": {
356
308
  "title": "Object",
357
309
  "$ref": "#/definitions/noun"
358
310
  },
359
311
  "target": {
360
312
  "title": "Target",
361
- "$ref": "#/definitions/noun"
313
+ "$ref": "#/definitions/noun",
314
+ "type": "ui_element_reference"
362
315
  }
363
316
  },
364
317
  "additionalProperties": false,
365
318
  "required": ["action", "target", "object"]
366
319
  },
367
- "click_and_hold": {
320
+ "embedded_test": {
368
321
  "type": "object",
369
- "title": "Click and Hold",
370
- "description": "Clicks and holds the left mouse button over object for a number of seconds",
322
+ "action_type": "embedded_test",
323
+ "title": "Embedded Test",
324
+ "description": "Embeds a Test",
371
325
  "properties": {
372
326
  "action": {
373
- "enum": ["click_and_hold"]
374
- },
375
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
376
- "target": {
377
- "title": "Target",
378
- "$ref": "#/definitions/noun"
379
- },
380
- "seconds": {"title": "Seconds", "type": "integer"}
381
- },
382
- "additionalProperties": false,
383
- "required": ["action", "target", "seconds"]
384
- },
385
- "custom_action": {
386
- "type": "object",
387
- "title": "Custom Action",
388
- "description": "Reusable custom action",
389
- "properties": {
390
- "action": {
391
- "enum": ["custom_action"]
327
+ "enum": ["embedded_test"]
392
328
  },
393
329
  "test_id": {
394
330
  "title": "Test ID",
@@ -398,81 +334,73 @@
398
334
  "additionalProperties": false,
399
335
  "required": ["action", "test_id"]
400
336
  },
401
- "plain_language": {
337
+ "tester_instruction": {
402
338
  "type": "object",
403
- "title": "Plain Language",
404
- "description": "Allows to fallback to english",
339
+ "action_type": "action",
340
+ "title": "Tester Instruction",
341
+ "description": "An action for a human to complete",
405
342
  "properties": {
406
343
  "action": {
407
- "enum": ["plain_language"]
344
+ "enum": ["tester_instruction"]
408
345
  },
409
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
346
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
410
347
  "instruction": {"title": "Instruction", "type": "string"}
411
348
  },
412
349
  "additionalProperties": false,
413
350
  "required": ["action", "instruction"]
414
351
  },
415
- "see": {
352
+ "observe": {
416
353
  "type": "object",
417
- "title": "See",
418
- "description": "Checks if element of the UI is visible",
354
+ "action_type": "assertion",
355
+ "title": "Observe",
356
+ "description": "Checks if element of the UI is visible or not",
419
357
  "properties": {
420
- "assertion": {
421
- "enum": ["see"]
358
+ "action": {
359
+ "enum": ["observe"]
422
360
  },
423
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
361
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
424
362
  "object": {
425
363
  "title": "Object",
426
364
  "$ref": "#/definitions/noun"
427
- }
428
- },
429
- "additionalProperties": false,
430
- "required": ["assertion", "object"]
431
- },
432
- "disappear": {
433
- "type": "object",
434
- "title": "Disappear",
435
- "description": "Checks if element of the UI is no longer visible",
436
- "properties": {
437
- "assertion": {
438
- "enum": ["disappear"]
439
365
  },
440
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
441
- "object": {
442
- "title": "Object",
443
- "$ref": "#/definitions/noun"
366
+ "visibility": {
367
+ "title": "Is the element visible?",
368
+ "type": "boolean",
369
+ "enum": [true, false]
444
370
  }
445
371
  },
446
372
  "additionalProperties": false,
447
- "required": ["assertion", "object"]
373
+ "required": ["action", "object", "visibility"]
448
374
  },
449
375
  "loaded": {
450
376
  "type": "object",
377
+ "action_type": "assertion",
451
378
  "title": "Loaded",
452
379
  "description": "Checks if specified page has loaded",
453
380
  "properties": {
454
- "assertion": {
381
+ "action": {
455
382
  "enum": ["loaded"]
456
383
  },
457
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
384
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
458
385
  "page": {"title": "Page", "type": "string"}
459
386
  },
460
387
  "additionalProperties": false,
461
- "required": ["assertion", "page"]
388
+ "required": ["action", "page"]
462
389
  },
463
- "plain_language_assertion": {
390
+ "tester_confirmation": {
464
391
  "type": "object",
465
- "title": "Plain Language Assertion",
466
- "description": "Allows to fallback to english",
392
+ "action_type": "assertion",
393
+ "title": "Tester Confirmation",
394
+ "description": "Ask a question to confirm a behavior",
467
395
  "properties": {
468
- "assertion": {
469
- "enum": ["plain_language_assertion"]
396
+ "action": {
397
+ "enum": ["tester_confirmation"]
470
398
  },
471
- "custom_action_id": {"title": "Custom Action ID", "type": "integer"},
472
- "instruction": {"title": "Instruction", "type": "string"}
399
+ "embedded_test_id": {"title": "Embedded Test ID", "type": "integer"},
400
+ "confirmation": {"title": "confirmation", "type": "string"}
473
401
  },
474
402
  "additionalProperties": false,
475
- "required": ["assertion", "instruction"]
403
+ "required": ["action", "confirmation"]
476
404
  }
477
405
  },
478
406
  "type": "object",
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.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Grodowski