slicetest 0.6.1 → 0.8.0
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.
- package/README.md +177 -24
- package/dist/cli.js +66 -2
- package/dist/config.d.ts +18 -0
- package/dist/config.js +13 -0
- package/dist/connection.d.ts +5 -0
- package/dist/connection.js +31 -0
- package/dist/db.d.ts +12 -1
- package/dist/db.js +33 -6
- package/dist/diagram.d.ts +13 -0
- package/dist/diagram.js +89 -0
- package/dist/form.d.ts +7 -2
- package/dist/form.js +72 -7
- package/dist/global-setup.d.ts +5 -0
- package/dist/global-setup.js +74 -9
- package/dist/graphql.d.ts +34 -0
- package/dist/graphql.js +56 -0
- package/dist/har.d.ts +49 -0
- package/dist/har.js +107 -0
- package/dist/http.d.ts +21 -3
- package/dist/http.js +47 -10
- package/dist/index.d.ts +5 -3
- package/dist/init.js +184 -15
- package/dist/list.d.ts +26 -0
- package/dist/list.js +71 -0
- package/dist/matchers.d.ts +16 -0
- package/dist/matchers.js +81 -1
- package/dist/openapi.d.ts +21 -0
- package/dist/openapi.js +32 -1
- package/dist/provided.d.ts +1 -0
- package/dist/record.d.ts +1 -1
- package/dist/record.js +3 -1
- package/dist/recording.d.ts +1 -1
- package/dist/recording.js +2 -2
- package/dist/runtime.d.ts +12 -5
- package/dist/runtime.js +78 -22
- package/dist/scenario.d.ts +14 -4
- package/dist/scenario.js +36 -17
- package/dist/schema.d.ts +5 -0
- package/dist/schema.js +73 -0
- package/dist/stub.d.ts +63 -0
- package/dist/stub.js +292 -5
- package/dist/timeline.d.ts +9 -0
- package/dist/timeline.js +6 -0
- package/dist/webhook.d.ts +16 -7
- package/dist/webhook.js +47 -7
- package/dist/yaml-runtime.d.ts +3 -2
- package/dist/yaml-runtime.js +308 -51
- package/dist/yaml.d.ts +82 -6
- package/dist/yaml.js +187 -21
- package/package.json +2 -1
- package/schema/scenario.schema.json +640 -14
|
@@ -15,6 +15,41 @@
|
|
|
15
15
|
"$ref": "#/$defs/step"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
+
"define": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"description": "Named step lists that `use:` steps run. A list of steps, or { params, steps } for values given with `with:`",
|
|
21
|
+
"additionalProperties": {
|
|
22
|
+
"oneOf": [
|
|
23
|
+
{
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": {
|
|
26
|
+
"$ref": "#/$defs/step"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": [
|
|
33
|
+
"steps"
|
|
34
|
+
],
|
|
35
|
+
"properties": {
|
|
36
|
+
"params": {
|
|
37
|
+
"type": "array",
|
|
38
|
+
"items": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"steps": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": {
|
|
45
|
+
"$ref": "#/$defs/step"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
},
|
|
18
53
|
"scenarios": {
|
|
19
54
|
"type": "array",
|
|
20
55
|
"minItems": 1,
|
|
@@ -51,6 +86,14 @@
|
|
|
51
86
|
"items": {
|
|
52
87
|
"$ref": "#/$defs/step"
|
|
53
88
|
}
|
|
89
|
+
},
|
|
90
|
+
"tags": {
|
|
91
|
+
"type": "array",
|
|
92
|
+
"items": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"pattern": "^[^\\s,!]+$"
|
|
95
|
+
},
|
|
96
|
+
"description": "Labels to select scenarios by: npx slicetest --tag smoke (or !slow to leave some out)"
|
|
54
97
|
}
|
|
55
98
|
}
|
|
56
99
|
}
|
|
@@ -62,8 +105,7 @@
|
|
|
62
105
|
{
|
|
63
106
|
"type": "object",
|
|
64
107
|
"required": [
|
|
65
|
-
"stub"
|
|
66
|
-
"on"
|
|
108
|
+
"stub"
|
|
67
109
|
],
|
|
68
110
|
"additionalProperties": false,
|
|
69
111
|
"properties": {
|
|
@@ -93,7 +135,14 @@
|
|
|
93
135
|
"json": {
|
|
94
136
|
"description": "Subset of the request JSON"
|
|
95
137
|
},
|
|
96
|
-
"
|
|
138
|
+
"form": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"description": "Subset of a form-encoded body's fields; bracket keys are nested (metadata[order] → metadata: { order })"
|
|
141
|
+
},
|
|
142
|
+
"body": {},
|
|
143
|
+
"variables": {
|
|
144
|
+
"description": "Subset of the GraphQL variables (with `graphql`)"
|
|
145
|
+
}
|
|
97
146
|
}
|
|
98
147
|
},
|
|
99
148
|
"reply": {
|
|
@@ -112,6 +161,10 @@
|
|
|
112
161
|
"body": {
|
|
113
162
|
"description": "String, or anything else to send as JSON. May use {{call.params.x}}, {{call.json.x}}, {{call.query.x}}"
|
|
114
163
|
},
|
|
164
|
+
"file": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"description": "Answer with this file's content, relative to the scenario file: .json and .yaml are sent as JSON (and may use {{call.*}}), other files as they are, with a content type from the extension"
|
|
167
|
+
},
|
|
115
168
|
"sse": {
|
|
116
169
|
"type": "array",
|
|
117
170
|
"description": "A streamed reply (Server-Sent Events), instead of body: a list of { event, data, id }. Data that isn't a string is sent as JSON",
|
|
@@ -131,12 +184,84 @@
|
|
|
131
184
|
}
|
|
132
185
|
}
|
|
133
186
|
}
|
|
187
|
+
},
|
|
188
|
+
"data": {
|
|
189
|
+
"description": "GraphQL `data` (with `graphql`): the reply's body is { data, errors }"
|
|
190
|
+
},
|
|
191
|
+
"errors": {
|
|
192
|
+
"type": "array",
|
|
193
|
+
"description": "GraphQL errors (with `graphql`): messages or { message, path, extensions }",
|
|
194
|
+
"items": {
|
|
195
|
+
"oneOf": [
|
|
196
|
+
{
|
|
197
|
+
"type": "string"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"type": "object",
|
|
201
|
+
"required": [
|
|
202
|
+
"message"
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}
|
|
134
207
|
}
|
|
135
208
|
},
|
|
136
209
|
"not": {
|
|
137
|
-
"
|
|
138
|
-
|
|
139
|
-
|
|
210
|
+
"anyOf": [
|
|
211
|
+
{
|
|
212
|
+
"required": [
|
|
213
|
+
"body",
|
|
214
|
+
"sse"
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"required": [
|
|
219
|
+
"body",
|
|
220
|
+
"data"
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"required": [
|
|
225
|
+
"body",
|
|
226
|
+
"errors"
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"required": [
|
|
231
|
+
"sse",
|
|
232
|
+
"data"
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"required": [
|
|
237
|
+
"sse",
|
|
238
|
+
"errors"
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"required": [
|
|
243
|
+
"file",
|
|
244
|
+
"body"
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"required": [
|
|
249
|
+
"file",
|
|
250
|
+
"sse"
|
|
251
|
+
]
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"required": [
|
|
255
|
+
"file",
|
|
256
|
+
"data"
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"required": [
|
|
261
|
+
"file",
|
|
262
|
+
"errors"
|
|
263
|
+
]
|
|
264
|
+
}
|
|
140
265
|
]
|
|
141
266
|
}
|
|
142
267
|
},
|
|
@@ -158,6 +283,10 @@
|
|
|
158
283
|
"body": {
|
|
159
284
|
"description": "String, or anything else to send as JSON. May use {{call.params.x}}, {{call.json.x}}, {{call.query.x}}"
|
|
160
285
|
},
|
|
286
|
+
"file": {
|
|
287
|
+
"type": "string",
|
|
288
|
+
"description": "Answer with this file's content, relative to the scenario file: .json and .yaml are sent as JSON (and may use {{call.*}}), other files as they are, with a content type from the extension"
|
|
289
|
+
},
|
|
161
290
|
"sse": {
|
|
162
291
|
"type": "array",
|
|
163
292
|
"description": "A streamed reply (Server-Sent Events), instead of body: a list of { event, data, id }. Data that isn't a string is sent as JSON",
|
|
@@ -177,12 +306,84 @@
|
|
|
177
306
|
}
|
|
178
307
|
}
|
|
179
308
|
}
|
|
309
|
+
},
|
|
310
|
+
"data": {
|
|
311
|
+
"description": "GraphQL `data` (with `graphql`): the reply's body is { data, errors }"
|
|
312
|
+
},
|
|
313
|
+
"errors": {
|
|
314
|
+
"type": "array",
|
|
315
|
+
"description": "GraphQL errors (with `graphql`): messages or { message, path, extensions }",
|
|
316
|
+
"items": {
|
|
317
|
+
"oneOf": [
|
|
318
|
+
{
|
|
319
|
+
"type": "string"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"type": "object",
|
|
323
|
+
"required": [
|
|
324
|
+
"message"
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
]
|
|
328
|
+
}
|
|
180
329
|
}
|
|
181
330
|
},
|
|
182
331
|
"not": {
|
|
183
|
-
"
|
|
184
|
-
|
|
185
|
-
|
|
332
|
+
"anyOf": [
|
|
333
|
+
{
|
|
334
|
+
"required": [
|
|
335
|
+
"body",
|
|
336
|
+
"sse"
|
|
337
|
+
]
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"required": [
|
|
341
|
+
"body",
|
|
342
|
+
"data"
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"required": [
|
|
347
|
+
"body",
|
|
348
|
+
"errors"
|
|
349
|
+
]
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"required": [
|
|
353
|
+
"sse",
|
|
354
|
+
"data"
|
|
355
|
+
]
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"required": [
|
|
359
|
+
"sse",
|
|
360
|
+
"errors"
|
|
361
|
+
]
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"required": [
|
|
365
|
+
"file",
|
|
366
|
+
"body"
|
|
367
|
+
]
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"required": [
|
|
371
|
+
"file",
|
|
372
|
+
"sse"
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"required": [
|
|
377
|
+
"file",
|
|
378
|
+
"data"
|
|
379
|
+
]
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"required": [
|
|
383
|
+
"file",
|
|
384
|
+
"errors"
|
|
385
|
+
]
|
|
386
|
+
}
|
|
186
387
|
]
|
|
187
388
|
}
|
|
188
389
|
},
|
|
@@ -198,8 +399,38 @@
|
|
|
198
399
|
"delay": {
|
|
199
400
|
"type": "integer",
|
|
200
401
|
"minimum": 0
|
|
402
|
+
},
|
|
403
|
+
"graphql": {
|
|
404
|
+
"type": "string",
|
|
405
|
+
"description": "A GraphQL operation (its operationName, or the name in the document), instead of METHOD /path. Matches POST and GET GraphQL requests to any path"
|
|
406
|
+
},
|
|
407
|
+
"optional": {
|
|
408
|
+
"type": "boolean",
|
|
409
|
+
"description": "The app may not call this route: strictStubs doesn't report it as unused"
|
|
201
410
|
}
|
|
202
|
-
}
|
|
411
|
+
},
|
|
412
|
+
"oneOf": [
|
|
413
|
+
{
|
|
414
|
+
"required": [
|
|
415
|
+
"on"
|
|
416
|
+
],
|
|
417
|
+
"not": {
|
|
418
|
+
"required": [
|
|
419
|
+
"graphql"
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"required": [
|
|
425
|
+
"graphql"
|
|
426
|
+
],
|
|
427
|
+
"not": {
|
|
428
|
+
"required": [
|
|
429
|
+
"on"
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
]
|
|
203
434
|
},
|
|
204
435
|
{
|
|
205
436
|
"type": "object",
|
|
@@ -226,6 +457,103 @@
|
|
|
226
457
|
"form": {
|
|
227
458
|
"type": "object"
|
|
228
459
|
},
|
|
460
|
+
"multipart": {
|
|
461
|
+
"type": "object",
|
|
462
|
+
"description": "A multipart/form-data body: fields, and files as { file: avatar.png } (relative to the scenario file) or { content, filename, type }",
|
|
463
|
+
"additionalProperties": {
|
|
464
|
+
"oneOf": [
|
|
465
|
+
{
|
|
466
|
+
"oneOf": [
|
|
467
|
+
{
|
|
468
|
+
"type": [
|
|
469
|
+
"string",
|
|
470
|
+
"number",
|
|
471
|
+
"boolean"
|
|
472
|
+
]
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"type": "object",
|
|
476
|
+
"additionalProperties": false,
|
|
477
|
+
"properties": {
|
|
478
|
+
"file": {
|
|
479
|
+
"type": "string",
|
|
480
|
+
"description": "Path relative to the scenario file"
|
|
481
|
+
},
|
|
482
|
+
"content": {
|
|
483
|
+
"description": "Inline file content; objects are sent as JSON"
|
|
484
|
+
},
|
|
485
|
+
"filename": {
|
|
486
|
+
"type": "string"
|
|
487
|
+
},
|
|
488
|
+
"type": {
|
|
489
|
+
"type": "string",
|
|
490
|
+
"description": "Content type; from the file extension by default"
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
"oneOf": [
|
|
494
|
+
{
|
|
495
|
+
"required": [
|
|
496
|
+
"file"
|
|
497
|
+
]
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"required": [
|
|
501
|
+
"content"
|
|
502
|
+
]
|
|
503
|
+
}
|
|
504
|
+
]
|
|
505
|
+
}
|
|
506
|
+
]
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"type": "array",
|
|
510
|
+
"items": {
|
|
511
|
+
"oneOf": [
|
|
512
|
+
{
|
|
513
|
+
"type": [
|
|
514
|
+
"string",
|
|
515
|
+
"number",
|
|
516
|
+
"boolean"
|
|
517
|
+
]
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"type": "object",
|
|
521
|
+
"additionalProperties": false,
|
|
522
|
+
"properties": {
|
|
523
|
+
"file": {
|
|
524
|
+
"type": "string",
|
|
525
|
+
"description": "Path relative to the scenario file"
|
|
526
|
+
},
|
|
527
|
+
"content": {
|
|
528
|
+
"description": "Inline file content; objects are sent as JSON"
|
|
529
|
+
},
|
|
530
|
+
"filename": {
|
|
531
|
+
"type": "string"
|
|
532
|
+
},
|
|
533
|
+
"type": {
|
|
534
|
+
"type": "string",
|
|
535
|
+
"description": "Content type; from the file extension by default"
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
"oneOf": [
|
|
539
|
+
{
|
|
540
|
+
"required": [
|
|
541
|
+
"file"
|
|
542
|
+
]
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"required": [
|
|
546
|
+
"content"
|
|
547
|
+
]
|
|
548
|
+
}
|
|
549
|
+
]
|
|
550
|
+
}
|
|
551
|
+
]
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
]
|
|
555
|
+
}
|
|
556
|
+
},
|
|
229
557
|
"body": {
|
|
230
558
|
"type": "string"
|
|
231
559
|
},
|
|
@@ -260,7 +588,14 @@
|
|
|
260
588
|
"github",
|
|
261
589
|
"slack",
|
|
262
590
|
"shopify",
|
|
263
|
-
"standard"
|
|
591
|
+
"standard",
|
|
592
|
+
"line",
|
|
593
|
+
"paddle",
|
|
594
|
+
"linear",
|
|
595
|
+
"gitlab",
|
|
596
|
+
"zoom",
|
|
597
|
+
"twitch",
|
|
598
|
+
"twilio"
|
|
264
599
|
]
|
|
265
600
|
},
|
|
266
601
|
{
|
|
@@ -304,6 +639,10 @@
|
|
|
304
639
|
"invalidSignature": {
|
|
305
640
|
"type": "boolean",
|
|
306
641
|
"description": "Signed with a different secret"
|
|
642
|
+
},
|
|
643
|
+
"url": {
|
|
644
|
+
"type": "string",
|
|
645
|
+
"description": "The URL the app validates against, for providers that sign it (twilio). Default: the app's address and the request path"
|
|
307
646
|
}
|
|
308
647
|
}
|
|
309
648
|
},
|
|
@@ -344,6 +683,17 @@
|
|
|
344
683
|
"type": "integer",
|
|
345
684
|
"minimum": 0,
|
|
346
685
|
"description": "At most this many SQL statements for this request, not counting BEGIN/COMMIT (needs db.queries)"
|
|
686
|
+
},
|
|
687
|
+
"schema": {
|
|
688
|
+
"description": "A JSON Schema the response JSON must match: inline, or a file relative to this one with an optional pointer, e.g. ../openapi.yaml#/components/schemas/Poll",
|
|
689
|
+
"oneOf": [
|
|
690
|
+
{
|
|
691
|
+
"type": "string"
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"type": "object"
|
|
695
|
+
}
|
|
696
|
+
]
|
|
347
697
|
}
|
|
348
698
|
}
|
|
349
699
|
},
|
|
@@ -353,7 +703,105 @@
|
|
|
353
703
|
"additionalProperties": {
|
|
354
704
|
"type": "string"
|
|
355
705
|
}
|
|
706
|
+
},
|
|
707
|
+
"graphql": {
|
|
708
|
+
"description": "Send a GraphQL operation as the JSON body: the query, or { query, variables, operationName }. A response with `errors` fails the step unless `expect.json` names `errors`",
|
|
709
|
+
"oneOf": [
|
|
710
|
+
{
|
|
711
|
+
"type": "string"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"type": "object",
|
|
715
|
+
"required": [
|
|
716
|
+
"query"
|
|
717
|
+
],
|
|
718
|
+
"additionalProperties": false,
|
|
719
|
+
"properties": {
|
|
720
|
+
"query": {
|
|
721
|
+
"type": "string"
|
|
722
|
+
},
|
|
723
|
+
"variables": {
|
|
724
|
+
"type": "object"
|
|
725
|
+
},
|
|
726
|
+
"operationName": {
|
|
727
|
+
"type": "string"
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
]
|
|
732
|
+
},
|
|
733
|
+
"within": {
|
|
734
|
+
"type": "integer",
|
|
735
|
+
"minimum": 1,
|
|
736
|
+
"description": "Repeat the request until `expect` passes, for up to this many milliseconds (polling a job the app finishes later)"
|
|
737
|
+
},
|
|
738
|
+
"every": {
|
|
739
|
+
"type": "integer",
|
|
740
|
+
"minimum": 1,
|
|
741
|
+
"description": "With `within`: milliseconds between attempts. Default 200"
|
|
742
|
+
},
|
|
743
|
+
"timeout": {
|
|
744
|
+
"type": "integer",
|
|
745
|
+
"minimum": 1,
|
|
746
|
+
"description": "Fail when the app hasn't answered within this many milliseconds (overrides http.timeout)"
|
|
356
747
|
}
|
|
748
|
+
},
|
|
749
|
+
"not": {
|
|
750
|
+
"anyOf": [
|
|
751
|
+
{
|
|
752
|
+
"required": [
|
|
753
|
+
"graphql",
|
|
754
|
+
"json"
|
|
755
|
+
]
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
"required": [
|
|
759
|
+
"graphql",
|
|
760
|
+
"form"
|
|
761
|
+
]
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"required": [
|
|
765
|
+
"graphql",
|
|
766
|
+
"body"
|
|
767
|
+
]
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"required": [
|
|
771
|
+
"multipart",
|
|
772
|
+
"json"
|
|
773
|
+
]
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"required": [
|
|
777
|
+
"multipart",
|
|
778
|
+
"form"
|
|
779
|
+
]
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"required": [
|
|
783
|
+
"multipart",
|
|
784
|
+
"body"
|
|
785
|
+
]
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
"required": [
|
|
789
|
+
"multipart",
|
|
790
|
+
"graphql"
|
|
791
|
+
]
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
"required": [
|
|
795
|
+
"within",
|
|
796
|
+
"concurrency"
|
|
797
|
+
]
|
|
798
|
+
}
|
|
799
|
+
]
|
|
800
|
+
},
|
|
801
|
+
"dependentRequired": {
|
|
802
|
+
"every": [
|
|
803
|
+
"within"
|
|
804
|
+
]
|
|
357
805
|
}
|
|
358
806
|
},
|
|
359
807
|
{
|
|
@@ -388,7 +836,7 @@
|
|
|
388
836
|
},
|
|
389
837
|
"fields": {
|
|
390
838
|
"type": "object",
|
|
391
|
-
"description": "Values typed into the form by field name; true / false / a list of values check checkboxes and radios",
|
|
839
|
+
"description": "Values typed into the form by field name; true / false / a list of values check checkboxes and radios; { file: path } uploads a file through a file input",
|
|
392
840
|
"additionalProperties": {
|
|
393
841
|
"oneOf": [
|
|
394
842
|
{
|
|
@@ -406,6 +854,36 @@
|
|
|
406
854
|
"number"
|
|
407
855
|
]
|
|
408
856
|
}
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"type": "object",
|
|
860
|
+
"additionalProperties": false,
|
|
861
|
+
"properties": {
|
|
862
|
+
"file": {
|
|
863
|
+
"type": "string",
|
|
864
|
+
"description": "Path relative to the scenario file"
|
|
865
|
+
},
|
|
866
|
+
"content": {},
|
|
867
|
+
"filename": {
|
|
868
|
+
"type": "string"
|
|
869
|
+
},
|
|
870
|
+
"type": {
|
|
871
|
+
"type": "string"
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
"oneOf": [
|
|
875
|
+
{
|
|
876
|
+
"required": [
|
|
877
|
+
"file"
|
|
878
|
+
]
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
"required": [
|
|
882
|
+
"content"
|
|
883
|
+
]
|
|
884
|
+
}
|
|
885
|
+
],
|
|
886
|
+
"description": "A file for a file input"
|
|
409
887
|
}
|
|
410
888
|
]
|
|
411
889
|
}
|
|
@@ -432,7 +910,18 @@
|
|
|
432
910
|
"json": {
|
|
433
911
|
"description": "Subset of the response JSON"
|
|
434
912
|
},
|
|
435
|
-
"text": {}
|
|
913
|
+
"text": {},
|
|
914
|
+
"schema": {
|
|
915
|
+
"description": "A JSON Schema the response JSON must match: inline, or a file relative to this one with an optional pointer, e.g. ../openapi.yaml#/components/schemas/Poll",
|
|
916
|
+
"oneOf": [
|
|
917
|
+
{
|
|
918
|
+
"type": "string"
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"type": "object"
|
|
922
|
+
}
|
|
923
|
+
]
|
|
924
|
+
}
|
|
436
925
|
}
|
|
437
926
|
},
|
|
438
927
|
"capture": {
|
|
@@ -707,7 +1196,14 @@
|
|
|
707
1196
|
"json": {
|
|
708
1197
|
"description": "Subset of the request JSON"
|
|
709
1198
|
},
|
|
710
|
-
"
|
|
1199
|
+
"form": {
|
|
1200
|
+
"type": "object",
|
|
1201
|
+
"description": "Subset of a form-encoded body's fields; bracket keys are nested (metadata[order] → metadata: { order })"
|
|
1202
|
+
},
|
|
1203
|
+
"body": {},
|
|
1204
|
+
"variables": {
|
|
1205
|
+
"description": "Subset of the GraphQL variables (with `graphql`)"
|
|
1206
|
+
}
|
|
711
1207
|
}
|
|
712
1208
|
},
|
|
713
1209
|
"times": {
|
|
@@ -719,7 +1215,17 @@
|
|
|
719
1215
|
"type": "integer",
|
|
720
1216
|
"minimum": 1,
|
|
721
1217
|
"description": "Retry this step for up to this many milliseconds, for effects the app applies asynchronously"
|
|
1218
|
+
},
|
|
1219
|
+
"graphql": {
|
|
1220
|
+
"type": "string",
|
|
1221
|
+
"description": "A GraphQL operation (its operationName, or the name in the document), instead of METHOD /path. Matches POST and GET GraphQL requests to any path"
|
|
722
1222
|
}
|
|
1223
|
+
},
|
|
1224
|
+
"not": {
|
|
1225
|
+
"required": [
|
|
1226
|
+
"call",
|
|
1227
|
+
"graphql"
|
|
1228
|
+
]
|
|
723
1229
|
}
|
|
724
1230
|
},
|
|
725
1231
|
{
|
|
@@ -792,6 +1298,105 @@
|
|
|
792
1298
|
"type": "integer",
|
|
793
1299
|
"minimum": 1,
|
|
794
1300
|
"description": "Retry this step for up to this many milliseconds, for effects the app applies asynchronously"
|
|
1301
|
+
},
|
|
1302
|
+
"ignore": {
|
|
1303
|
+
"type": "array",
|
|
1304
|
+
"items": {
|
|
1305
|
+
"type": "string"
|
|
1306
|
+
},
|
|
1307
|
+
"description": "Columns or tables to leave out: updated_at (in every table), orders.synced_at, sessions.*"
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
"type": "object",
|
|
1313
|
+
"required": [
|
|
1314
|
+
"set"
|
|
1315
|
+
],
|
|
1316
|
+
"additionalProperties": false,
|
|
1317
|
+
"properties": {
|
|
1318
|
+
"set": {
|
|
1319
|
+
"type": "object",
|
|
1320
|
+
"minProperties": 1,
|
|
1321
|
+
"propertyNames": {
|
|
1322
|
+
"pattern": "^[A-Za-z_]\\w*$"
|
|
1323
|
+
},
|
|
1324
|
+
"description": "Variables for later steps, e.g. { orderId: \"{{$uuid}}\", expires: \"{{$now+1d}}\" }"
|
|
1325
|
+
},
|
|
1326
|
+
"name": {
|
|
1327
|
+
"type": "string",
|
|
1328
|
+
"description": "Label shown when this step fails"
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
"type": "object",
|
|
1334
|
+
"required": [
|
|
1335
|
+
"order"
|
|
1336
|
+
],
|
|
1337
|
+
"additionalProperties": false,
|
|
1338
|
+
"properties": {
|
|
1339
|
+
"order": {
|
|
1340
|
+
"type": "array",
|
|
1341
|
+
"minItems": 2,
|
|
1342
|
+
"description": "Calls to stubs in the order they must have happened (others may come in between): \"<stub> METHOD /path\" or { stub, call, when }",
|
|
1343
|
+
"items": {
|
|
1344
|
+
"oneOf": [
|
|
1345
|
+
{
|
|
1346
|
+
"type": "string",
|
|
1347
|
+
"pattern": "^\\S+\\s+([A-Za-z]+|\\*)\\s+/\\S*$"
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
"type": "object",
|
|
1351
|
+
"additionalProperties": false,
|
|
1352
|
+
"required": [
|
|
1353
|
+
"stub",
|
|
1354
|
+
"call"
|
|
1355
|
+
],
|
|
1356
|
+
"properties": {
|
|
1357
|
+
"stub": {
|
|
1358
|
+
"type": "string"
|
|
1359
|
+
},
|
|
1360
|
+
"call": {
|
|
1361
|
+
"type": "string",
|
|
1362
|
+
"pattern": "^([A-Za-z]+|\\*)\\s+/\\S*$"
|
|
1363
|
+
},
|
|
1364
|
+
"when": {
|
|
1365
|
+
"type": "object",
|
|
1366
|
+
"additionalProperties": false,
|
|
1367
|
+
"properties": {
|
|
1368
|
+
"query": {
|
|
1369
|
+
"type": "object"
|
|
1370
|
+
},
|
|
1371
|
+
"headers": {
|
|
1372
|
+
"type": "object"
|
|
1373
|
+
},
|
|
1374
|
+
"json": {
|
|
1375
|
+
"description": "Subset of the request JSON"
|
|
1376
|
+
},
|
|
1377
|
+
"form": {
|
|
1378
|
+
"type": "object",
|
|
1379
|
+
"description": "Subset of a form-encoded body's fields; bracket keys are nested (metadata[order] → metadata: { order })"
|
|
1380
|
+
},
|
|
1381
|
+
"body": {},
|
|
1382
|
+
"variables": {
|
|
1383
|
+
"description": "Subset of the GraphQL variables (with `graphql`)"
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
]
|
|
1390
|
+
}
|
|
1391
|
+
},
|
|
1392
|
+
"within": {
|
|
1393
|
+
"type": "integer",
|
|
1394
|
+
"minimum": 1,
|
|
1395
|
+
"description": "Retry this step for up to this many milliseconds, for effects the app applies asynchronously"
|
|
1396
|
+
},
|
|
1397
|
+
"name": {
|
|
1398
|
+
"type": "string",
|
|
1399
|
+
"description": "Label shown when this step fails"
|
|
795
1400
|
}
|
|
796
1401
|
}
|
|
797
1402
|
},
|
|
@@ -993,6 +1598,27 @@
|
|
|
993
1598
|
"description": "Label shown when this step fails"
|
|
994
1599
|
}
|
|
995
1600
|
}
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
"type": "object",
|
|
1604
|
+
"required": [
|
|
1605
|
+
"use"
|
|
1606
|
+
],
|
|
1607
|
+
"additionalProperties": false,
|
|
1608
|
+
"properties": {
|
|
1609
|
+
"use": {
|
|
1610
|
+
"type": "string",
|
|
1611
|
+
"description": "Run the steps of a `define:` entry; what they capture is visible afterwards"
|
|
1612
|
+
},
|
|
1613
|
+
"name": {
|
|
1614
|
+
"type": "string",
|
|
1615
|
+
"description": "Label shown when this step fails"
|
|
1616
|
+
},
|
|
1617
|
+
"with": {
|
|
1618
|
+
"type": "object",
|
|
1619
|
+
"description": "Values for the definition's params, available as {{param}} inside it"
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
996
1622
|
}
|
|
997
1623
|
]
|
|
998
1624
|
},
|