doc-detective-common 1.9.0-record.0 → 1.10.0-dev.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.
@@ -0,0 +1,4197 @@
1
+ {
2
+ "checkLink_v2": {
3
+ "title": "checkLink",
4
+ "type": "object",
5
+ "description": "Check if a URL returns an acceptable status code from a GET request.",
6
+ "properties": {
7
+ "id": {
8
+ "type": "string",
9
+ "description": "ID of the step."
10
+ },
11
+ "description": {
12
+ "type": "string",
13
+ "description": "Description of the step."
14
+ },
15
+ "action": {
16
+ "type": "string",
17
+ "const": "checkLink",
18
+ "description": "Action to perform."
19
+ },
20
+ "url": {
21
+ "type": "string",
22
+ "description": "URL to check.",
23
+ "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
24
+ "transform": [
25
+ "trim"
26
+ ]
27
+ },
28
+ "origin": {
29
+ "type": "string",
30
+ "description": "Protocol and domain to navigate to. Prepended to `url`.",
31
+ "transform": [
32
+ "trim"
33
+ ]
34
+ },
35
+ "statusCodes": {
36
+ "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
37
+ "type": "array",
38
+ "items": {
39
+ "oneOf": [
40
+ {
41
+ "type": "integer"
42
+ }
43
+ ]
44
+ },
45
+ "default": [
46
+ 200,
47
+ 201,
48
+ 202
49
+ ]
50
+ }
51
+ },
52
+ "dynamicDefaults": {
53
+ "id": "uuid"
54
+ },
55
+ "required": [
56
+ "action",
57
+ "url"
58
+ ],
59
+ "additionalProperties": false,
60
+ "examples": [
61
+ {
62
+ "action": "checkLink",
63
+ "url": "https://www.google.com"
64
+ },
65
+ {
66
+ "action": "checkLink",
67
+ "url": "https://www.google.com",
68
+ "statusCodes": [
69
+ 200
70
+ ]
71
+ },
72
+ {
73
+ "action": "checkLink",
74
+ "url": "/search",
75
+ "origin": "www.google.com",
76
+ "statusCodes": [
77
+ 200
78
+ ]
79
+ }
80
+ ]
81
+ },
82
+ "config_v2": {
83
+ "title": "config",
84
+ "description": "Configuration options for Doc Detective operations.",
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "properties": {
88
+ "input": {
89
+ "default": ".",
90
+ "description": "Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files.",
91
+ "anyOf": [
92
+ {
93
+ "type": "string"
94
+ },
95
+ {
96
+ "type": "array",
97
+ "items": {
98
+ "anyOf": [
99
+ {
100
+ "type": "string"
101
+ }
102
+ ]
103
+ }
104
+ }
105
+ ]
106
+ },
107
+ "output": {
108
+ "default": ".",
109
+ "description": "Path of the directory in which to store the output of Doc Detective commands.",
110
+ "type": "string"
111
+ },
112
+ "recursive": {
113
+ "default": true,
114
+ "description": "If `true` searches `input`, `setup`, and `cleanup` paths recursively for test specificaions and source files.",
115
+ "type": "boolean"
116
+ },
117
+ "envVariables": {
118
+ "description": "Path to a `.env` file to load before performing a Doc Detective operation.",
119
+ "type": "string"
120
+ },
121
+ "runTests": {
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "description": "Options for running tests. When running tests, values set here override general configuration options.",
125
+ "properties": {
126
+ "input": {
127
+ "description": "Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files.",
128
+ "anyOf": [
129
+ {
130
+ "type": "string"
131
+ },
132
+ {
133
+ "type": "array",
134
+ "items": {
135
+ "anyOf": [
136
+ {
137
+ "type": "string"
138
+ }
139
+ ]
140
+ }
141
+ }
142
+ ]
143
+ },
144
+ "output": {
145
+ "description": "Path of the directory in which to store the output of Doc Detective commands.",
146
+ "type": "string",
147
+ "default": "."
148
+ },
149
+ "setup": {
150
+ "description": "Path(s) to test specifications to perform before those specified by `input`. Useful for setting up testing environments.",
151
+ "anyOf": [
152
+ {
153
+ "type": "string"
154
+ },
155
+ {
156
+ "type": "array",
157
+ "items": {
158
+ "anyOf": [
159
+ {
160
+ "type": "string"
161
+ }
162
+ ]
163
+ }
164
+ }
165
+ ]
166
+ },
167
+ "cleanup": {
168
+ "description": "Path(s) to test specifications to perform after those specified by `input`. Useful for cleaning up testing environments.",
169
+ "anyOf": [
170
+ {
171
+ "type": "string"
172
+ },
173
+ {
174
+ "type": "array",
175
+ "items": {
176
+ "anyOf": [
177
+ {
178
+ "type": "string"
179
+ }
180
+ ]
181
+ }
182
+ }
183
+ ]
184
+ },
185
+ "recursive": {
186
+ "description": "If `true` searches `input`, `setup`, and `cleanup` paths recursively for test specificaions and source files.",
187
+ "type": "boolean"
188
+ },
189
+ "detectSteps": {
190
+ "type": "boolean",
191
+ "description": "Whether or not to detect steps in input files based on markup regex.",
192
+ "default": true
193
+ },
194
+ "mediaDirectory": {
195
+ "description": "Path of the directory in which to store output media files.",
196
+ "type": "string",
197
+ "default": "."
198
+ },
199
+ "downloadDirectory": {
200
+ "description": "Path of the directory in which to store downloaded files.",
201
+ "type": "string",
202
+ "default": "."
203
+ },
204
+ "contexts": {
205
+ "type": "array",
206
+ "description": "Application/platform sets to run tests in. If no contexts are specified but a context is required by one or more tests, Doc Detective attempts to identify a supported context in the current environment and run tests against it. See [context](/reference/schemas/context).",
207
+ "items": {
208
+ "oneOf": [
209
+ {
210
+ "title": "context",
211
+ "type": "object",
212
+ "description": "An application and supported platforms.\n\nIf no contexts are specified but a context is required by one or more tests, Doc Detective attempts to identify a supported context in the current environment and run tests against it. For browsers, context priority is Firefox > Chrome > Chromium.",
213
+ "properties": {
214
+ "app": {
215
+ "type": "object",
216
+ "description": "The application to run.",
217
+ "additionalProperties": false,
218
+ "required": [
219
+ "name"
220
+ ],
221
+ "properties": {
222
+ "name": {
223
+ "type": "string",
224
+ "description": "Name of the application.",
225
+ "enum": [
226
+ "firefox",
227
+ "chrome"
228
+ ]
229
+ },
230
+ "path": {
231
+ "type": "string",
232
+ "description": "Path to the application. If not specified, defaults to typical install paths per platform. If specified but the path is invalid, the context is skipped."
233
+ },
234
+ "options": {
235
+ "type": "object",
236
+ "description": "Options to pass to the app. Only works when `name` is `firefox` or `chrome`.",
237
+ "additionalProperties": false,
238
+ "properties": {
239
+ "width": {
240
+ "type": "integer",
241
+ "description": "Width of the window in pixels."
242
+ },
243
+ "height": {
244
+ "type": "integer",
245
+ "description": "Height of the window in pixels."
246
+ },
247
+ "headless": {
248
+ "type": "boolean",
249
+ "description": "If `true`, runs the browser in headless mode."
250
+ }
251
+ }
252
+ }
253
+ }
254
+ },
255
+ "platforms": {
256
+ "description": "Supported platforms for the application.",
257
+ "type": "array",
258
+ "items": {
259
+ "type": "string",
260
+ "enum": [
261
+ "linux",
262
+ "mac",
263
+ "windows"
264
+ ]
265
+ }
266
+ }
267
+ },
268
+ "required": [
269
+ "app",
270
+ "platforms"
271
+ ],
272
+ "additionalProperties": false,
273
+ "examples": [
274
+ {
275
+ "app": {
276
+ "name": "firefox"
277
+ },
278
+ "platforms": [
279
+ "linux"
280
+ ]
281
+ },
282
+ {
283
+ "app": {
284
+ "name": "firefox",
285
+ "options": {
286
+ "width": 800,
287
+ "height": 600,
288
+ "headless": false
289
+ }
290
+ },
291
+ "platforms": [
292
+ "linux",
293
+ "windows",
294
+ "mac"
295
+ ]
296
+ },
297
+ {
298
+ "app": {
299
+ "name": "chrome"
300
+ },
301
+ "platforms": [
302
+ "linux",
303
+ "windows",
304
+ "mac"
305
+ ]
306
+ },
307
+ {
308
+ "app": {
309
+ "name": "firefox",
310
+ "path": "/usr/bin/firefox"
311
+ },
312
+ "platforms": [
313
+ "linux"
314
+ ]
315
+ }
316
+ ]
317
+ }
318
+ ]
319
+ },
320
+ "default": [
321
+ {
322
+ "app": {
323
+ "name": "firefox",
324
+ "options": {
325
+ "width": 1200,
326
+ "height": 800,
327
+ "headless": true
328
+ }
329
+ },
330
+ "platforms": [
331
+ "linux",
332
+ "mac",
333
+ "windows"
334
+ ]
335
+ }
336
+ ]
337
+ }
338
+ }
339
+ },
340
+ "runCoverage": {
341
+ "description": "Options for performing test coverage analysis on documentation source files. When performing coveration analysis, values set here override general configuration options.",
342
+ "type": "object",
343
+ "additionalProperties": false,
344
+ "properties": {
345
+ "input": {
346
+ "description": "Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files.",
347
+ "anyOf": [
348
+ {
349
+ "type": "string"
350
+ },
351
+ {
352
+ "type": "array",
353
+ "items": {
354
+ "anyOf": [
355
+ {
356
+ "type": "string"
357
+ }
358
+ ]
359
+ }
360
+ }
361
+ ]
362
+ },
363
+ "output": {
364
+ "description": "Path of the directory in which to store the output of Doc Detective commands.",
365
+ "type": "string",
366
+ "default": "."
367
+ },
368
+ "recursive": {
369
+ "description": "If `true` searches `input`, `setup`, and `cleanup` paths recursively for test specificaions and source files.",
370
+ "type": "boolean"
371
+ },
372
+ "markup": {
373
+ "default": [
374
+ "onscreenText",
375
+ "emphasis",
376
+ "image",
377
+ "hyperlink",
378
+ "codeInline",
379
+ "codeBlock",
380
+ "interaction"
381
+ ],
382
+ "description": "Markup types to include when performing this operation. If no markup types are specified, the operation includes all markup types as defined in `fileTypes`.",
383
+ "type": "array",
384
+ "items": {
385
+ "oneOf": [
386
+ {
387
+ "type": "string"
388
+ }
389
+ ]
390
+ }
391
+ }
392
+ }
393
+ },
394
+ "suggestTests": {
395
+ "description": "Options for suggesting tests based on documentation source files. When suggesting tests, values set here override general condiguration options.",
396
+ "type": "object",
397
+ "additionalProperties": false,
398
+ "properties": {
399
+ "input": {
400
+ "description": "Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files.",
401
+ "anyOf": [
402
+ {
403
+ "type": "string"
404
+ },
405
+ {
406
+ "type": "array",
407
+ "items": {
408
+ "anyOf": [
409
+ {
410
+ "type": "string"
411
+ }
412
+ ]
413
+ }
414
+ }
415
+ ]
416
+ },
417
+ "output": {
418
+ "description": "Path of the directory in which to store the output of Doc Detective commands.",
419
+ "type": "string",
420
+ "default": "."
421
+ },
422
+ "recursive": {
423
+ "description": "If `true` searches `input`, `setup`, and `cleanup` paths recursively for test specificaions and source files.",
424
+ "type": "boolean"
425
+ },
426
+ "markup": {
427
+ "default": [
428
+ "onscreenText",
429
+ "emphasis",
430
+ "image",
431
+ "hyperlink",
432
+ "codeInline",
433
+ "codeBlock",
434
+ "interaction"
435
+ ],
436
+ "description": "Markup types to include when performing this operation. If no markup types are specified, the operation includes all markup types as defined in `fileTypes`.",
437
+ "type": "array",
438
+ "items": {
439
+ "oneOf": [
440
+ {
441
+ "type": "string"
442
+ }
443
+ ]
444
+ }
445
+ }
446
+ }
447
+ },
448
+ "fileTypes": {
449
+ "description": "Information on supported file types and how to parse the markup within them.",
450
+ "type": "array",
451
+ "items": {
452
+ "oneOf": [
453
+ {
454
+ "type": "object",
455
+ "additionalProperties": false,
456
+ "properties": {
457
+ "name": {
458
+ "description": "Name of the file type.",
459
+ "type": "string"
460
+ },
461
+ "extensions": {
462
+ "description": "File extensions to support with this configuration.",
463
+ "type": "array",
464
+ "items": {
465
+ "oneOf": [
466
+ {
467
+ "type": "string"
468
+ }
469
+ ]
470
+ }
471
+ },
472
+ "testStartStatementOpen": {
473
+ "description": "Opening of an in-document test start statement.",
474
+ "type": "string"
475
+ },
476
+ "testStartStatementClose": {
477
+ "description": "Close of an in-document test start statement.",
478
+ "type": "string"
479
+ },
480
+ "testIgnoreStatement": {
481
+ "description": "Text for an in-document test ignore statement.",
482
+ "type": "string"
483
+ },
484
+ "testEndStatement": {
485
+ "description": "Text for an in-document test end statement.",
486
+ "type": "string"
487
+ },
488
+ "stepStatementOpen": {
489
+ "description": "Opening of an in-document step statement.",
490
+ "type": "string"
491
+ },
492
+ "stepStatementClose": {
493
+ "description": "Close of an in-document step statement.",
494
+ "type": "string"
495
+ },
496
+ "markup": {
497
+ "description": "Markup types and associated regex patterns to find in documentation source files.",
498
+ "type": "array",
499
+ "items": {
500
+ "oneOf": [
501
+ {
502
+ "type": "object",
503
+ "additionalProperties": false,
504
+ "properties": {
505
+ "name": {
506
+ "description": "Name of the markup type.",
507
+ "type": "string"
508
+ },
509
+ "regex": {
510
+ "description": "Regex patterns to find the markup type in documentation source files.",
511
+ "type": "array",
512
+ "minItems": 1,
513
+ "items": {
514
+ "oneOf": [
515
+ {
516
+ "type": "string"
517
+ }
518
+ ]
519
+ }
520
+ },
521
+ "actions": {
522
+ "description": "Actions that apply to the markup type.",
523
+ "type": "array",
524
+ "items": {
525
+ "oneOf": [
526
+ {
527
+ "type": "string",
528
+ "enum": [
529
+ "checkLink",
530
+ "find",
531
+ "goTo",
532
+ "httpRequest",
533
+ "runShell",
534
+ "saveScreenshot",
535
+ "setVariables",
536
+ "typeKeys",
537
+ "wait"
538
+ ]
539
+ },
540
+ {
541
+ "type": "object",
542
+ "additionalProperties": false,
543
+ "properties": {
544
+ "name": {
545
+ "description": "Name of the action.",
546
+ "type": "string",
547
+ "enum": [
548
+ "checkLink",
549
+ "find",
550
+ "goTo",
551
+ "httpRequest",
552
+ "runShell",
553
+ "saveScreenshot",
554
+ "setVariables",
555
+ "typeKeys",
556
+ "wait"
557
+ ]
558
+ },
559
+ "params": {
560
+ "description": "Parameters for the action.",
561
+ "type": "object",
562
+ "additionalProperties": true
563
+ }
564
+ },
565
+ "required": [
566
+ "name"
567
+ ]
568
+ }
569
+ ]
570
+ }
571
+ }
572
+ },
573
+ "required": [
574
+ "name",
575
+ "regex"
576
+ ]
577
+ }
578
+ ]
579
+ }
580
+ }
581
+ },
582
+ "required": [
583
+ "extensions",
584
+ "testStartStatementOpen",
585
+ "testStartStatementClose",
586
+ "testIgnoreStatement",
587
+ "testEndStatement",
588
+ "stepStatementOpen",
589
+ "stepStatementClose",
590
+ "markup"
591
+ ]
592
+ }
593
+ ]
594
+ },
595
+ "default": [
596
+ {
597
+ "name": "Markdown",
598
+ "extensions": [
599
+ ".md",
600
+ ".mdx"
601
+ ],
602
+ "testStartStatementOpen": "[comment]: # (test start",
603
+ "testStartStatementClose": ")",
604
+ "testIgnoreStatement": "[comment]: # (test ignore)",
605
+ "testEndStatement": "[comment]: # (test end)",
606
+ "stepStatementOpen": "[comment]: # (step",
607
+ "stepStatementClose": ")",
608
+ "markup": [
609
+ {
610
+ "name": "onscreenText",
611
+ "regex": [
612
+ "\\*\\*.+?\\*\\*"
613
+ ],
614
+ "actions": [
615
+ "find"
616
+ ]
617
+ },
618
+ {
619
+ "name": "emphasis",
620
+ "regex": [
621
+ "(?<!\\*)\\*(?!\\*).+?(?<!\\*)\\*(?!\\*)"
622
+ ],
623
+ "actions": [
624
+ "find"
625
+ ]
626
+ },
627
+ {
628
+ "name": "image",
629
+ "regex": [
630
+ "!\\[.+?\\]\\(.+?\\)"
631
+ ],
632
+ "actions": [
633
+ "checkLink"
634
+ ]
635
+ },
636
+ {
637
+ "name": "hyperlink",
638
+ "regex": [
639
+ "(?<!!)\\[.+?\\]\\(.+?\\)"
640
+ ],
641
+ "actions": [
642
+ "checkLink",
643
+ "goTo",
644
+ "httpRequest"
645
+ ]
646
+ },
647
+ {
648
+ "name": "orderedList",
649
+ "regex": [
650
+ "(?<=\n) *?[0-9][0-9]?[0-9]?.\\s*.*"
651
+ ]
652
+ },
653
+ {
654
+ "name": "unorderedList",
655
+ "regex": [
656
+ "(?<=\n) *?\\*.\\s*.*",
657
+ "(?<=\n) *?-.\\s*.*"
658
+ ]
659
+ },
660
+ {
661
+ "name": "codeInline",
662
+ "regex": [
663
+ "(?<!`)`(?!`).+?(?<!`)`(?!`)"
664
+ ],
665
+ "actions": [
666
+ "runShell",
667
+ "setVariables",
668
+ "httpRequest"
669
+ ]
670
+ },
671
+ {
672
+ "name": "codeBlock",
673
+ "regex": [
674
+ "(?=(```))(\\w|\\W)*(?<=```)"
675
+ ],
676
+ "actions": [
677
+ "runShell",
678
+ "setVariables",
679
+ "httpRequest"
680
+ ]
681
+ },
682
+ {
683
+ "name": "interaction",
684
+ "regex": [
685
+ "[cC]lick",
686
+ "[tT]ap",
687
+ "[tT]ouch",
688
+ "[sS]elect",
689
+ "[cC]hoose",
690
+ "[tT]oggle",
691
+ "[eE]nable",
692
+ "[dD]isable",
693
+ "[tT]urn [oO][ff|n]",
694
+ "[tT]ype",
695
+ "[eE]nter",
696
+ "[sS]end",
697
+ "[aA]dd",
698
+ "[rR]emove",
699
+ "[dD]elete",
700
+ "[uU]pload",
701
+ "[dD]ownload",
702
+ "[sS]croll",
703
+ "[sS]earch",
704
+ "[fF]ilter",
705
+ "[sS]ort",
706
+ "[cC]opy",
707
+ "[pP]aste",
708
+ "[cC]ut",
709
+ "[rR]eplace",
710
+ "[cC]lear",
711
+ "[rR]efresh",
712
+ "[rR]evert",
713
+ "[rR]estore",
714
+ "[rR]eset",
715
+ "[lL]ogin",
716
+ "[lL]ogout",
717
+ "[sS]ign [iI]n",
718
+ "[sS]ign [oO]ut",
719
+ "[sS]ubmit",
720
+ "[cC]ancel",
721
+ "[cC]lose",
722
+ "[aA]ccept",
723
+ "[dD]ecline",
724
+ "[dD]eny",
725
+ "[rR]eject",
726
+ "[rR]etry",
727
+ "[rR]estart",
728
+ "[rR]esume"
729
+ ],
730
+ "actions": [
731
+ "checkLink",
732
+ "find",
733
+ "goTo",
734
+ "httpRequest",
735
+ "runShell",
736
+ "saveScreenshot",
737
+ "setVariables",
738
+ "typeKeys",
739
+ "wait"
740
+ ]
741
+ }
742
+ ]
743
+ }
744
+ ]
745
+ },
746
+ "integrations": {
747
+ "description": "Options for connecting to external services.",
748
+ "type": "object",
749
+ "additionalProperties": false,
750
+ "properties": {}
751
+ },
752
+ "telemetry": {
753
+ "description": "Options around sending telemetry for Doc Detective usage.",
754
+ "type": "object",
755
+ "additionalProperties": false,
756
+ "properties": {
757
+ "send": {
758
+ "description": "If `true`, sends Doc Detective telemetry.",
759
+ "type": "boolean",
760
+ "default": false
761
+ },
762
+ "userId": {
763
+ "description": "Identifier for the organization, group, or individual running Doc Detective.",
764
+ "type": "string"
765
+ }
766
+ },
767
+ "required": [
768
+ "send"
769
+ ]
770
+ },
771
+ "logLevel": {
772
+ "description": "Amount of detail to output when performing an operation.",
773
+ "type": "string",
774
+ "enum": [
775
+ "silent",
776
+ "error",
777
+ "warning",
778
+ "info",
779
+ "debug"
780
+ ],
781
+ "default": "info"
782
+ }
783
+ },
784
+ "definitions": {
785
+ "input": {
786
+ "description": "Path(s) to test specifications and documentation source files. May be paths to specific files or to directories to scan for files.",
787
+ "anyOf": [
788
+ {
789
+ "type": "string"
790
+ },
791
+ {
792
+ "type": "array",
793
+ "items": {
794
+ "anyOf": [
795
+ {
796
+ "type": "string"
797
+ }
798
+ ]
799
+ }
800
+ }
801
+ ]
802
+ },
803
+ "recursive": {
804
+ "description": "If `true` searches `input`, `setup`, and `cleanup` paths recursively for test specificaions and source files.",
805
+ "type": "boolean"
806
+ },
807
+ "output": {
808
+ "description": "Path of the directory in which to store the output of Doc Detective commands.",
809
+ "type": "string",
810
+ "default": "."
811
+ },
812
+ "markupToInclude": {
813
+ "description": "Markup types to include when performing this operation. If no markup types are specified, the operation includes all markup types as defined in `fileTypes`.",
814
+ "type": "array",
815
+ "items": {
816
+ "oneOf": [
817
+ {
818
+ "type": "string"
819
+ }
820
+ ]
821
+ }
822
+ }
823
+ },
824
+ "examples": [
825
+ {},
826
+ {
827
+ "input": ".",
828
+ "output": "."
829
+ },
830
+ {
831
+ "envVariables": "",
832
+ "input": ".",
833
+ "output": ".",
834
+ "recursive": true,
835
+ "logLevel": "info",
836
+ "runTests": {
837
+ "input": ".",
838
+ "output": ".",
839
+ "setup": "",
840
+ "cleanup": "",
841
+ "recursive": true,
842
+ "mediaDirectory": ".",
843
+ "downloadDirectory": ".",
844
+ "contexts": [
845
+ {
846
+ "app": {
847
+ "name": "firefox",
848
+ "path": ""
849
+ },
850
+ "platforms": [
851
+ "linux",
852
+ "mac",
853
+ "windows"
854
+ ]
855
+ }
856
+ ]
857
+ }
858
+ },
859
+ {
860
+ "envVariables": "",
861
+ "input": ".",
862
+ "output": ".",
863
+ "recursive": true,
864
+ "logLevel": "info",
865
+ "runTests": {
866
+ "input": ".",
867
+ "output": ".",
868
+ "setup": "",
869
+ "cleanup": "",
870
+ "recursive": true,
871
+ "mediaDirectory": ".",
872
+ "downloadDirectory": ".",
873
+ "contexts": [
874
+ {
875
+ "app": {
876
+ "name": "firefox",
877
+ "path": ""
878
+ },
879
+ "platforms": [
880
+ "linux",
881
+ "mac",
882
+ "windows"
883
+ ]
884
+ }
885
+ ]
886
+ },
887
+ "runCoverage": {
888
+ "recursive": true,
889
+ "input": ".",
890
+ "output": ".",
891
+ "markup": []
892
+ },
893
+ "suggestTests": {
894
+ "recursive": true,
895
+ "input": ".",
896
+ "output": ".",
897
+ "markup": []
898
+ },
899
+ "fileTypes": [
900
+ {
901
+ "name": "Markdown",
902
+ "extensions": [
903
+ ".md",
904
+ ".mdx"
905
+ ],
906
+ "testStartStatementOpen": "[comment]: # (test start",
907
+ "testStartStatementClose": ")",
908
+ "testIgnoreStatement": "[comment]: # (test ignore)",
909
+ "testEndStatement": "[comment]: # (test end)",
910
+ "stepStatementOpen": "[comment]: # (step",
911
+ "stepStatementClose": ")",
912
+ "markup": [
913
+ {
914
+ "name": "onscreenText",
915
+ "regex": [
916
+ "\\*\\*.+?\\*\\*"
917
+ ],
918
+ "actions": [
919
+ {
920
+ "name": "find",
921
+ "params": {
922
+ "moveTo": true,
923
+ "click": true
924
+ }
925
+ }
926
+ ]
927
+ },
928
+ {
929
+ "name": "emphasis",
930
+ "regex": [
931
+ "(?<!\\*)\\*(?!\\*).+?(?<!\\*)\\*(?!\\*)"
932
+ ],
933
+ "actions": [
934
+ "find"
935
+ ]
936
+ },
937
+ {
938
+ "name": "image",
939
+ "regex": [
940
+ "!\\[.+?\\]\\(.+?\\)"
941
+ ],
942
+ "actions": [
943
+ "checkLink"
944
+ ]
945
+ },
946
+ {
947
+ "name": "hyperlink",
948
+ "regex": [
949
+ "(?<!!)\\[.+?\\]\\(.+?\\)"
950
+ ],
951
+ "actions": [
952
+ "checkLink",
953
+ "goTo",
954
+ "httpRequest"
955
+ ]
956
+ },
957
+ {
958
+ "name": "orderedList",
959
+ "regex": [
960
+ "(?<=\n) *?[0-9][0-9]?[0-9]?.\\s*.*"
961
+ ]
962
+ },
963
+ {
964
+ "name": "unorderedList",
965
+ "regex": [
966
+ "(?<=\n) *?\\*.\\s*.*",
967
+ "(?<=\n) *?-.\\s*.*"
968
+ ]
969
+ },
970
+ {
971
+ "name": "codeInline",
972
+ "regex": [
973
+ "(?<!`)`(?!`).+?(?<!`)`(?!`)"
974
+ ],
975
+ "actions": [
976
+ "runShell",
977
+ "setVariables",
978
+ "httpRequest"
979
+ ]
980
+ },
981
+ {
982
+ "name": "codeBlock",
983
+ "regex": [
984
+ "(?=(```))(\\w|\\W)*(?<=```)"
985
+ ],
986
+ "actions": [
987
+ "runShell",
988
+ "setVariables",
989
+ "httpRequest"
990
+ ]
991
+ },
992
+ {
993
+ "name": "interaction",
994
+ "regex": [
995
+ "[cC]lick",
996
+ "[tT]ap",
997
+ "[tT]ouch",
998
+ "[sS]elect",
999
+ "[cC]hoose",
1000
+ "[tT]oggle",
1001
+ "[eE]nable",
1002
+ "[dD]isable",
1003
+ "[tT]urn [oO][ff|n]",
1004
+ "[tT]ype",
1005
+ "[eE]nter",
1006
+ "[sS]end",
1007
+ "[aA]dd",
1008
+ "[rR]emove",
1009
+ "[dD]elete",
1010
+ "[uU]pload",
1011
+ "[dD]ownload",
1012
+ "[sS]croll",
1013
+ "[sS]earch",
1014
+ "[fF]ilter",
1015
+ "[sS]ort",
1016
+ "[cC]opy",
1017
+ "[pP]aste",
1018
+ "[cC]ut",
1019
+ "[rR]eplace",
1020
+ "[cC]lear",
1021
+ "[rR]efresh",
1022
+ "[rR]evert",
1023
+ "[rR]estore",
1024
+ "[rR]eset",
1025
+ "[lL]ogin",
1026
+ "[lL]ogout",
1027
+ "[sS]ign [iI]n",
1028
+ "[sS]ign [oO]ut",
1029
+ "[sS]ubmit",
1030
+ "[cC]ancel",
1031
+ "[cC]lose",
1032
+ "[aA]ccept",
1033
+ "[dD]ecline",
1034
+ "[dD]eny",
1035
+ "[rR]eject",
1036
+ "[rR]etry",
1037
+ "[rR]estart",
1038
+ "[rR]esume"
1039
+ ],
1040
+ "actions": [
1041
+ "checkLink",
1042
+ "find",
1043
+ "goTo",
1044
+ "httpRequest",
1045
+ "runShell",
1046
+ "saveScreenshot",
1047
+ "setVariables",
1048
+ "typeKeys",
1049
+ "wait"
1050
+ ]
1051
+ }
1052
+ ]
1053
+ }
1054
+ ],
1055
+ "integrations": {},
1056
+ "telemetry": {
1057
+ "send": false,
1058
+ "userId": "Doc Detective"
1059
+ }
1060
+ },
1061
+ {
1062
+ "envVariables": "",
1063
+ "input": [
1064
+ "."
1065
+ ],
1066
+ "output": ".",
1067
+ "recursive": true,
1068
+ "logLevel": "info",
1069
+ "runTests": {
1070
+ "input": [
1071
+ "."
1072
+ ],
1073
+ "output": ".",
1074
+ "setup": [
1075
+ "."
1076
+ ],
1077
+ "cleanup": [
1078
+ "."
1079
+ ],
1080
+ "recursive": true,
1081
+ "mediaDirectory": ".",
1082
+ "downloadDirectory": ".",
1083
+ "contexts": [
1084
+ {
1085
+ "app": {
1086
+ "name": "firefox",
1087
+ "options": {
1088
+ "width": 1200,
1089
+ "height": 800,
1090
+ "headless": true
1091
+ }
1092
+ },
1093
+ "platforms": [
1094
+ "linux",
1095
+ "mac",
1096
+ "windows"
1097
+ ]
1098
+ }
1099
+ ]
1100
+ },
1101
+ "runCoverage": {
1102
+ "recursive": true,
1103
+ "input": [
1104
+ "."
1105
+ ],
1106
+ "output": ".",
1107
+ "markup": []
1108
+ },
1109
+ "suggestTests": {
1110
+ "recursive": true,
1111
+ "input": [
1112
+ "."
1113
+ ],
1114
+ "output": ".",
1115
+ "markup": []
1116
+ },
1117
+ "fileTypes": [
1118
+ {
1119
+ "name": "Markdown",
1120
+ "extensions": [
1121
+ ".md",
1122
+ ".mdx"
1123
+ ],
1124
+ "testStartStatementOpen": "[comment]: # (test start",
1125
+ "testStartStatementClose": ")",
1126
+ "testIgnoreStatement": "[comment]: # (test ignore)",
1127
+ "testEndStatement": "[comment]: # (test end)",
1128
+ "stepStatementOpen": "[comment]: # (step",
1129
+ "stepStatementClose": ")",
1130
+ "markup": [
1131
+ {
1132
+ "name": "onscreenText",
1133
+ "regex": [
1134
+ "\\*\\*.+?\\*\\*"
1135
+ ],
1136
+ "actions": [
1137
+ "find"
1138
+ ]
1139
+ },
1140
+ {
1141
+ "name": "emphasis",
1142
+ "regex": [
1143
+ "(?<!\\*)\\*(?!\\*).+?(?<!\\*)\\*(?!\\*)"
1144
+ ],
1145
+ "actions": [
1146
+ "find"
1147
+ ]
1148
+ },
1149
+ {
1150
+ "name": "image",
1151
+ "regex": [
1152
+ "!\\[.+?\\]\\(.+?\\)"
1153
+ ],
1154
+ "actions": [
1155
+ "checkLink"
1156
+ ]
1157
+ },
1158
+ {
1159
+ "name": "hyperlink",
1160
+ "regex": [
1161
+ "(?<!!)\\[.+?\\]\\(.+?\\)"
1162
+ ],
1163
+ "actions": [
1164
+ "checkLink",
1165
+ "goTo",
1166
+ "httpRequest"
1167
+ ]
1168
+ },
1169
+ {
1170
+ "name": "orderedList",
1171
+ "regex": [
1172
+ "(?<=\n) *?[0-9][0-9]?[0-9]?.\\s*.*"
1173
+ ]
1174
+ },
1175
+ {
1176
+ "name": "unorderedList",
1177
+ "regex": [
1178
+ "(?<=\n) *?\\*.\\s*.*",
1179
+ "(?<=\n) *?-.\\s*.*"
1180
+ ]
1181
+ },
1182
+ {
1183
+ "name": "codeInline",
1184
+ "regex": [
1185
+ "(?<!`)`(?!`).+?(?<!`)`(?!`)"
1186
+ ],
1187
+ "actions": [
1188
+ "runShell",
1189
+ "setVariables",
1190
+ "httpRequest"
1191
+ ]
1192
+ },
1193
+ {
1194
+ "name": "codeBlock",
1195
+ "regex": [
1196
+ "(?=(```))(\\w|\\W)*(?<=```)"
1197
+ ],
1198
+ "actions": [
1199
+ "runShell",
1200
+ "setVariables",
1201
+ "httpRequest"
1202
+ ]
1203
+ },
1204
+ {
1205
+ "name": "interaction",
1206
+ "regex": [
1207
+ "[cC]lick",
1208
+ "[tT]ap",
1209
+ "[tT]ouch",
1210
+ "[sS]elect",
1211
+ "[cC]hoose",
1212
+ "[tT]oggle",
1213
+ "[eE]nable",
1214
+ "[dD]isable",
1215
+ "[tT]urn [oO][ff|n]",
1216
+ "[tT]ype",
1217
+ "[eE]nter",
1218
+ "[sS]end",
1219
+ "[aA]dd",
1220
+ "[rR]emove",
1221
+ "[dD]elete",
1222
+ "[uU]pload",
1223
+ "[dD]ownload",
1224
+ "[sS]croll",
1225
+ "[sS]earch",
1226
+ "[fF]ilter",
1227
+ "[sS]ort",
1228
+ "[cC]opy",
1229
+ "[pP]aste",
1230
+ "[cC]ut",
1231
+ "[rR]eplace",
1232
+ "[cC]lear",
1233
+ "[rR]efresh",
1234
+ "[rR]evert",
1235
+ "[rR]estore",
1236
+ "[rR]eset",
1237
+ "[lL]ogin",
1238
+ "[lL]ogout",
1239
+ "[sS]ign [iI]n",
1240
+ "[sS]ign [oO]ut",
1241
+ "[sS]ubmit",
1242
+ "[cC]ancel",
1243
+ "[cC]lose",
1244
+ "[aA]ccept",
1245
+ "[dD]ecline",
1246
+ "[dD]eny",
1247
+ "[rR]eject",
1248
+ "[rR]etry",
1249
+ "[rR]estart",
1250
+ "[rR]esume"
1251
+ ],
1252
+ "actions": [
1253
+ "checkLink",
1254
+ "find",
1255
+ "goTo",
1256
+ "httpRequest",
1257
+ "runShell",
1258
+ "saveScreenshot",
1259
+ "setVariables",
1260
+ "typeKeys",
1261
+ "wait"
1262
+ ]
1263
+ }
1264
+ ]
1265
+ }
1266
+ ],
1267
+ "integrations": {},
1268
+ "telemetry": {
1269
+ "send": false,
1270
+ "userId": "Doc Detective"
1271
+ }
1272
+ }
1273
+ ]
1274
+ },
1275
+ "context_v2": {
1276
+ "title": "context",
1277
+ "type": "object",
1278
+ "description": "An application and supported platforms.\n\nIf no contexts are specified but a context is required by one or more tests, Doc Detective attempts to identify a supported context in the current environment and run tests against it. For browsers, context priority is Firefox > Chrome > Chromium.",
1279
+ "properties": {
1280
+ "app": {
1281
+ "type": "object",
1282
+ "description": "The application to run.",
1283
+ "additionalProperties": false,
1284
+ "required": [
1285
+ "name"
1286
+ ],
1287
+ "properties": {
1288
+ "name": {
1289
+ "type": "string",
1290
+ "description": "Name of the application.",
1291
+ "enum": [
1292
+ "firefox",
1293
+ "chrome"
1294
+ ]
1295
+ },
1296
+ "path": {
1297
+ "type": "string",
1298
+ "description": "Path to the application. If not specified, defaults to typical install paths per platform. If specified but the path is invalid, the context is skipped."
1299
+ },
1300
+ "options": {
1301
+ "type": "object",
1302
+ "description": "Options to pass to the app. Only works when `name` is `firefox` or `chrome`.",
1303
+ "additionalProperties": false,
1304
+ "properties": {
1305
+ "width": {
1306
+ "type": "integer",
1307
+ "description": "Width of the window in pixels."
1308
+ },
1309
+ "height": {
1310
+ "type": "integer",
1311
+ "description": "Height of the window in pixels."
1312
+ },
1313
+ "headless": {
1314
+ "type": "boolean",
1315
+ "description": "If `true`, runs the browser in headless mode."
1316
+ }
1317
+ }
1318
+ }
1319
+ }
1320
+ },
1321
+ "platforms": {
1322
+ "description": "Supported platforms for the application.",
1323
+ "type": "array",
1324
+ "items": {
1325
+ "type": "string",
1326
+ "enum": [
1327
+ "linux",
1328
+ "mac",
1329
+ "windows"
1330
+ ]
1331
+ }
1332
+ }
1333
+ },
1334
+ "required": [
1335
+ "app",
1336
+ "platforms"
1337
+ ],
1338
+ "additionalProperties": false,
1339
+ "examples": [
1340
+ {
1341
+ "app": {
1342
+ "name": "firefox"
1343
+ },
1344
+ "platforms": [
1345
+ "linux"
1346
+ ]
1347
+ },
1348
+ {
1349
+ "app": {
1350
+ "name": "firefox",
1351
+ "options": {
1352
+ "width": 800,
1353
+ "height": 600,
1354
+ "headless": false
1355
+ }
1356
+ },
1357
+ "platforms": [
1358
+ "linux",
1359
+ "windows",
1360
+ "mac"
1361
+ ]
1362
+ },
1363
+ {
1364
+ "app": {
1365
+ "name": "chrome"
1366
+ },
1367
+ "platforms": [
1368
+ "linux",
1369
+ "windows",
1370
+ "mac"
1371
+ ]
1372
+ },
1373
+ {
1374
+ "app": {
1375
+ "name": "firefox",
1376
+ "path": "/usr/bin/firefox"
1377
+ },
1378
+ "platforms": [
1379
+ "linux"
1380
+ ]
1381
+ }
1382
+ ]
1383
+ },
1384
+ "find_v2": {
1385
+ "title": "find",
1386
+ "type": "object",
1387
+ "description": "Check if an element exists with the specified CSS selector.",
1388
+ "properties": {
1389
+ "id": {
1390
+ "type": "string",
1391
+ "description": "ID of the step."
1392
+ },
1393
+ "description": {
1394
+ "type": "string",
1395
+ "description": "Description of the step."
1396
+ },
1397
+ "action": {
1398
+ "type": "string",
1399
+ "const": "find",
1400
+ "description": "Action to perform."
1401
+ },
1402
+ "selector": {
1403
+ "description": "Selector that uniquely identifies the element.",
1404
+ "type": "string"
1405
+ },
1406
+ "timeout": {
1407
+ "type": "integer",
1408
+ "description": "Max duration in milliseconds to wait for the element to exist.",
1409
+ "default": 5000
1410
+ },
1411
+ "matchText": {
1412
+ "type": "string",
1413
+ "description": "Text that the element should contain. If the element doesn't contain the text, the step fails."
1414
+ },
1415
+ "moveTo": {
1416
+ "type": "boolean",
1417
+ "description": "Move to the element. If the element isn't visible, it's scrolled into view. Only runs the if the test is being recorded."
1418
+ },
1419
+ "click": {
1420
+ "type": "boolean",
1421
+ "description": "Click the element."
1422
+ },
1423
+ "typeKeys": {
1424
+ "description": "Type keys after finding the element. Either a string or an object with a `keys` field as defined in [`typeKeys`](/reference/schemas/typeKeys).<br><br>To type in the element, make the element active with the `click` parameter.",
1425
+ "oneOf": [
1426
+ {
1427
+ "type": "string"
1428
+ },
1429
+ {
1430
+ "type": "object",
1431
+ "additionalProperties": false,
1432
+ "properties": {
1433
+ "keys": {
1434
+ "description": "String of keys to enter.",
1435
+ "anyOf": [
1436
+ {
1437
+ "type": "string"
1438
+ },
1439
+ {
1440
+ "type": "array",
1441
+ "items": {
1442
+ "oneOf": [
1443
+ {
1444
+ "type": "string"
1445
+ }
1446
+ ]
1447
+ }
1448
+ }
1449
+ ]
1450
+ }
1451
+ }
1452
+ }
1453
+ ]
1454
+ }
1455
+ },
1456
+ "required": [
1457
+ "action",
1458
+ "selector"
1459
+ ],
1460
+ "dynamicDefaults": {
1461
+ "id": "uuid"
1462
+ },
1463
+ "additionalProperties": false,
1464
+ "examples": [
1465
+ {
1466
+ "action": "find",
1467
+ "selector": "[title=Search]"
1468
+ },
1469
+ {
1470
+ "action": "find",
1471
+ "selector": "[title=Search]",
1472
+ "timeout": 10000,
1473
+ "matchText": "Search",
1474
+ "moveTo": true,
1475
+ "click": true,
1476
+ "typeKeys": "shorthair cat"
1477
+ }
1478
+ ]
1479
+ },
1480
+ "goTo_v2": {
1481
+ "title": "goTo",
1482
+ "type": "object",
1483
+ "description": "Navigate to a specified URL.",
1484
+ "properties": {
1485
+ "id": {
1486
+ "type": "string",
1487
+ "description": "ID of the step."
1488
+ },
1489
+ "description": {
1490
+ "type": "string",
1491
+ "description": "Description of the step."
1492
+ },
1493
+ "action": {
1494
+ "type": "string",
1495
+ "const": "goTo",
1496
+ "description": "Action to perform."
1497
+ },
1498
+ "url": {
1499
+ "type": "string",
1500
+ "description": "URL to navigate to.",
1501
+ "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
1502
+ "transform": [
1503
+ "trim"
1504
+ ]
1505
+ },
1506
+ "origin": {
1507
+ "type": "string",
1508
+ "description": "Protocol and domain to navigate to. Prepended to `url`.",
1509
+ "transform": [
1510
+ "trim"
1511
+ ]
1512
+ }
1513
+ },
1514
+ "dynamicDefaults": {
1515
+ "id": "uuid"
1516
+ },
1517
+ "required": [
1518
+ "action",
1519
+ "url"
1520
+ ],
1521
+ "additionalProperties": false,
1522
+ "examples": [
1523
+ {
1524
+ "action": "goTo",
1525
+ "url": "https://www.google.com"
1526
+ },
1527
+ {
1528
+ "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
1529
+ "description": "This is a test!",
1530
+ "action": "goTo",
1531
+ "url": "https://www.google.com"
1532
+ },
1533
+ {
1534
+ "id": "ddec5e20-2e81-4f38-867c-92c8d9516756",
1535
+ "description": "This is a test!",
1536
+ "action": "goTo",
1537
+ "url": "/search",
1538
+ "origin": "https://www.google.com"
1539
+ }
1540
+ ]
1541
+ },
1542
+ "httpRequest_v2": {
1543
+ "title": "httpRequest",
1544
+ "type": "object",
1545
+ "description": "Perform a generic HTTP request, for example to an API.",
1546
+ "properties": {
1547
+ "id": {
1548
+ "type": "string",
1549
+ "description": "ID of the step."
1550
+ },
1551
+ "description": {
1552
+ "type": "string",
1553
+ "description": "Description of the step."
1554
+ },
1555
+ "action": {
1556
+ "type": "string",
1557
+ "const": "httpRequest",
1558
+ "description": "Aciton to perform."
1559
+ },
1560
+ "url": {
1561
+ "type": "string",
1562
+ "description": "URL for the HTTP request.",
1563
+ "pattern": "(^(http://|https://).*|\\$[A-Za-z0-9_]+)",
1564
+ "transform": [
1565
+ "trim"
1566
+ ]
1567
+ },
1568
+ "statusCodes": {
1569
+ "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
1570
+ "type": "array",
1571
+ "items": {
1572
+ "oneOf": [
1573
+ {
1574
+ "type": "integer"
1575
+ }
1576
+ ]
1577
+ },
1578
+ "default": [
1579
+ 200
1580
+ ]
1581
+ },
1582
+ "method": {
1583
+ "type": "string",
1584
+ "description": "Method of the HTTP request",
1585
+ "enum": [
1586
+ "get",
1587
+ "put",
1588
+ "post",
1589
+ "patch",
1590
+ "delete"
1591
+ ],
1592
+ "transform": [
1593
+ "trim",
1594
+ "toEnumCase"
1595
+ ],
1596
+ "default": "get"
1597
+ },
1598
+ "requestHeaders": {
1599
+ "description": "Headers to include in the HTTP request, in key/value format.",
1600
+ "type": "object",
1601
+ "additionalProperties": true,
1602
+ "properties": {},
1603
+ "default": {}
1604
+ },
1605
+ "responseHeaders": {
1606
+ "description": "Headers expected in the response, in key/value format. If one or more `responseHeaders` entries aren't present in the response, the step fails.",
1607
+ "type": "object",
1608
+ "additionalProperties": true,
1609
+ "properties": {},
1610
+ "default": {}
1611
+ },
1612
+ "requestParams": {
1613
+ "description": "URL parameters to include in the HTTP request, in key/value format.",
1614
+ "type": "object",
1615
+ "additionalProperties": true,
1616
+ "default": {},
1617
+ "properties": {}
1618
+ },
1619
+ "responseParams": {
1620
+ "description": "URL parameters expected in the response, in key/value format. If one or more `responseParams` entries aren't present in the response, the step fails.",
1621
+ "type": "object",
1622
+ "additionalProperties": true,
1623
+ "default": {},
1624
+ "properties": {}
1625
+ },
1626
+ "requestData": {
1627
+ "description": "JSON object to include as the body of the HTTP request.",
1628
+ "type": "object",
1629
+ "additionalProperties": true,
1630
+ "default": {},
1631
+ "properties": {}
1632
+ },
1633
+ "responseData": {
1634
+ "description": "JSON object expected in the response. If one or more key/value pairs aren't present in the response, the step fails.",
1635
+ "type": "object",
1636
+ "additionalProperties": true,
1637
+ "default": {},
1638
+ "properties": {}
1639
+ },
1640
+ "envsFromResponseData": {
1641
+ "description": "Environment variables to set based on response variables, as an object of the environment variable name and the jq filter applied to the response data to identify the variable's value.",
1642
+ "type": "array",
1643
+ "default": [],
1644
+ "items": {
1645
+ "oneOf": [
1646
+ {
1647
+ "description": "",
1648
+ "type": "object",
1649
+ "properties": {
1650
+ "name": {
1651
+ "description": "Name of the environment variable to set.",
1652
+ "type": "string"
1653
+ },
1654
+ "jqFilter": {
1655
+ "description": "jq filter to apply to the response data. If the filter doesn't return a value, the environment variable isn't set.",
1656
+ "type": "string"
1657
+ }
1658
+ },
1659
+ "required": [
1660
+ "name",
1661
+ "jqFilter"
1662
+ ]
1663
+ }
1664
+ ]
1665
+ }
1666
+ }
1667
+ },
1668
+ "dynamicDefaults": {
1669
+ "id": "uuid"
1670
+ },
1671
+ "required": [
1672
+ "action",
1673
+ "url"
1674
+ ],
1675
+ "additionalProperties": false,
1676
+ "examples": [
1677
+ {
1678
+ "action": "httpRequest",
1679
+ "url": "https://reqres.in/api/users"
1680
+ },
1681
+ {
1682
+ "action": "httpRequest",
1683
+ "url": "https://reqres.in/api/users/2",
1684
+ "method": "put",
1685
+ "requestData": {
1686
+ "name": "morpheus",
1687
+ "job": "zion resident"
1688
+ }
1689
+ },
1690
+ {
1691
+ "action": "httpRequest",
1692
+ "url": "https://reqres.in/api/users",
1693
+ "method": "post",
1694
+ "requestData": {
1695
+ "name": "morpheus",
1696
+ "job": "leader"
1697
+ },
1698
+ "responseData": {
1699
+ "name": "morpheus",
1700
+ "job": "leader"
1701
+ },
1702
+ "statusCodes": [
1703
+ 200,
1704
+ 201
1705
+ ]
1706
+ },
1707
+ {
1708
+ "action": "httpRequest",
1709
+ "url": "https://www.api-server.com",
1710
+ "method": "post",
1711
+ "requestHeaders": {
1712
+ "header": "value"
1713
+ },
1714
+ "requestParams": {
1715
+ "param": "value"
1716
+ },
1717
+ "requestData": {
1718
+ "field": "value"
1719
+ },
1720
+ "responseHeaders": {
1721
+ "header": "value"
1722
+ },
1723
+ "responseData": {
1724
+ "field": "value"
1725
+ },
1726
+ "statusCodes": [
1727
+ 200
1728
+ ]
1729
+ }
1730
+ ]
1731
+ },
1732
+ "runShell_v2": {
1733
+ "title": "runShell",
1734
+ "type": "object",
1735
+ "description": "Perform a native shell command.",
1736
+ "properties": {
1737
+ "id": {
1738
+ "type": "string",
1739
+ "description": "ID of the step."
1740
+ },
1741
+ "description": {
1742
+ "type": "string",
1743
+ "description": "Description of the step."
1744
+ },
1745
+ "action": {
1746
+ "type": "string",
1747
+ "const": "runShell",
1748
+ "description": "The action to perform."
1749
+ },
1750
+ "command": {
1751
+ "type": "string",
1752
+ "description": "Command to perform in the machine's default shell."
1753
+ },
1754
+ "args": {
1755
+ "type": "array",
1756
+ "description": "Arguments for the command.",
1757
+ "items": {
1758
+ "oneOf": [
1759
+ {
1760
+ "type": "string"
1761
+ }
1762
+ ]
1763
+ },
1764
+ "default": []
1765
+ }
1766
+ },
1767
+ "dynamicDefaults": {
1768
+ "id": "uuid"
1769
+ },
1770
+ "additionalProperties": false,
1771
+ "required": [
1772
+ "action",
1773
+ "command"
1774
+ ],
1775
+ "examples": [
1776
+ {
1777
+ "action": "runShell",
1778
+ "command": "echo",
1779
+ "args": [
1780
+ "$USER"
1781
+ ]
1782
+ },
1783
+ {
1784
+ "action": "runShell",
1785
+ "command": "echo",
1786
+ "args": [
1787
+ "hello-world"
1788
+ ],
1789
+ "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
1790
+ "description": "This is a test!"
1791
+ }
1792
+ ]
1793
+ },
1794
+ "saveScreenshot_v2": {
1795
+ "title": "saveScreenshot",
1796
+ "type": "object",
1797
+ "description": "Takes a screenshot in PNG format.",
1798
+ "properties": {
1799
+ "id": {
1800
+ "type": "string",
1801
+ "description": "ID of the step."
1802
+ },
1803
+ "description": {
1804
+ "type": "string",
1805
+ "description": "Description of the step."
1806
+ },
1807
+ "action": {
1808
+ "type": "string",
1809
+ "const": "saveScreenshot",
1810
+ "description": "The action to perform."
1811
+ },
1812
+ "path": {
1813
+ "type": "string",
1814
+ "description": "Relative file path of the PNG file from `directory`. If not specified, the file name is the ID of the step.",
1815
+ "pattern": "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)"
1816
+ },
1817
+ "directory": {
1818
+ "type": "string",
1819
+ "description": "Directory of the PNG file. Attempts to creatr the directory if it doesn't exist. If not specified, the directory is your media directory."
1820
+ },
1821
+ "maxVariation": {
1822
+ "type": "number",
1823
+ "description": "Allowed variation in percentage of pixels between the new screenshot and the exisitng screenshot at `path`. If the difference between the new screenshot and the existing screenshot is greater than `maxVariation`, the step fails. If a screenshot doesn't exist at `path`, this value is ignored.",
1824
+ "minimum": 0,
1825
+ "maximum": 100
1826
+ },
1827
+ "overwrite": {
1828
+ "type": "string",
1829
+ "description": "If `true`, overwrites the existing screenshot at `path` if it exists.\nIf `byVariation`, overwrites the existing screenshot at `path` if the difference between the new screenshot and the existing screenshot is greater than `maxVariation`.",
1830
+ "enum": [
1831
+ "true",
1832
+ "false",
1833
+ "byVariation"
1834
+ ],
1835
+ "default": false
1836
+ }
1837
+ },
1838
+ "dynamicDefaults": {
1839
+ "id": "uuid"
1840
+ },
1841
+ "required": [
1842
+ "action"
1843
+ ],
1844
+ "additionalProperties": false,
1845
+ "examples": [
1846
+ {
1847
+ "action": "saveScreenshot"
1848
+ },
1849
+ {
1850
+ "action": "saveScreenshot",
1851
+ "path": "results.png"
1852
+ },
1853
+ {
1854
+ "action": "saveScreenshot",
1855
+ "path": "results.png",
1856
+ "directory": "static/images"
1857
+ },
1858
+ {
1859
+ "action": "saveScreenshot",
1860
+ "path": "results.png",
1861
+ "directory": "static/images",
1862
+ "maxVariation": 10,
1863
+ "overwrite": "byVariation"
1864
+ }
1865
+ ]
1866
+ },
1867
+ "setVariables_v2": {
1868
+ "title": "setVariables",
1869
+ "type": "object",
1870
+ "description": "Load environment variables from a `.env` file.",
1871
+ "properties": {
1872
+ "id": {
1873
+ "type": "string",
1874
+ "description": "ID of the step."
1875
+ },
1876
+ "description": {
1877
+ "type": "string",
1878
+ "description": "Description of the step."
1879
+ },
1880
+ "action": {
1881
+ "type": "string",
1882
+ "const": "setVariables",
1883
+ "description": "Action to perform."
1884
+ },
1885
+ "path": {
1886
+ "type": "string",
1887
+ "description": "Path to the `.env` file."
1888
+ }
1889
+ },
1890
+ "dynamicDefaults": {
1891
+ "id": "uuid"
1892
+ },
1893
+ "required": [
1894
+ "action",
1895
+ "path"
1896
+ ],
1897
+ "additionalProperties": false,
1898
+ "examples": [
1899
+ {
1900
+ "action": "setVariables",
1901
+ "path": ".env"
1902
+ }
1903
+ ]
1904
+ },
1905
+ "spec_v2": {
1906
+ "title": "specification",
1907
+ "type": "object",
1908
+ "properties": {
1909
+ "id": {
1910
+ "type": "string",
1911
+ "description": "Unique identifier for the test specification."
1912
+ },
1913
+ "description": {
1914
+ "type": "string",
1915
+ "description": "Description of the test specification."
1916
+ },
1917
+ "file": {
1918
+ "type": "string",
1919
+ "description": "Path to the file that the specification is associated with."
1920
+ },
1921
+ "contexts": {
1922
+ "type": "array",
1923
+ "description": "Application/platform sets to run tests in. Overrides `contexts` defined at the config-level.",
1924
+ "items": {
1925
+ "oneOf": [
1926
+ {
1927
+ "title": "context",
1928
+ "type": "object",
1929
+ "description": "An application and supported platforms.\n\nIf no contexts are specified but a context is required by one or more tests, Doc Detective attempts to identify a supported context in the current environment and run tests against it. For browsers, context priority is Firefox > Chrome > Chromium.",
1930
+ "properties": {
1931
+ "app": {
1932
+ "type": "object",
1933
+ "description": "The application to run.",
1934
+ "additionalProperties": false,
1935
+ "required": [
1936
+ "name"
1937
+ ],
1938
+ "properties": {
1939
+ "name": {
1940
+ "type": "string",
1941
+ "description": "Name of the application.",
1942
+ "enum": [
1943
+ "firefox",
1944
+ "chrome"
1945
+ ]
1946
+ },
1947
+ "path": {
1948
+ "type": "string",
1949
+ "description": "Path to the application. If not specified, defaults to typical install paths per platform. If specified but the path is invalid, the context is skipped."
1950
+ },
1951
+ "options": {
1952
+ "type": "object",
1953
+ "description": "Options to pass to the app. Only works when `name` is `firefox` or `chrome`.",
1954
+ "additionalProperties": false,
1955
+ "properties": {
1956
+ "width": {
1957
+ "type": "integer",
1958
+ "description": "Width of the window in pixels."
1959
+ },
1960
+ "height": {
1961
+ "type": "integer",
1962
+ "description": "Height of the window in pixels."
1963
+ },
1964
+ "headless": {
1965
+ "type": "boolean",
1966
+ "description": "If `true`, runs the browser in headless mode."
1967
+ }
1968
+ }
1969
+ }
1970
+ }
1971
+ },
1972
+ "platforms": {
1973
+ "description": "Supported platforms for the application.",
1974
+ "type": "array",
1975
+ "items": {
1976
+ "type": "string",
1977
+ "enum": [
1978
+ "linux",
1979
+ "mac",
1980
+ "windows"
1981
+ ]
1982
+ }
1983
+ }
1984
+ },
1985
+ "required": [
1986
+ "app",
1987
+ "platforms"
1988
+ ],
1989
+ "additionalProperties": false,
1990
+ "examples": [
1991
+ {
1992
+ "app": {
1993
+ "name": "firefox"
1994
+ },
1995
+ "platforms": [
1996
+ "linux"
1997
+ ]
1998
+ },
1999
+ {
2000
+ "app": {
2001
+ "name": "firefox",
2002
+ "options": {
2003
+ "width": 800,
2004
+ "height": 600,
2005
+ "headless": false
2006
+ }
2007
+ },
2008
+ "platforms": [
2009
+ "linux",
2010
+ "windows",
2011
+ "mac"
2012
+ ]
2013
+ },
2014
+ {
2015
+ "app": {
2016
+ "name": "chrome"
2017
+ },
2018
+ "platforms": [
2019
+ "linux",
2020
+ "windows",
2021
+ "mac"
2022
+ ]
2023
+ },
2024
+ {
2025
+ "app": {
2026
+ "name": "firefox",
2027
+ "path": "/usr/bin/firefox"
2028
+ },
2029
+ "platforms": [
2030
+ "linux"
2031
+ ]
2032
+ }
2033
+ ]
2034
+ }
2035
+ ]
2036
+ }
2037
+ },
2038
+ "tests": {
2039
+ "description": "[Tests](/reference/schemas/test) to perform.",
2040
+ "type": "array",
2041
+ "minItems": 1,
2042
+ "items": {
2043
+ "oneOf": [
2044
+ {
2045
+ "title": "test",
2046
+ "type": "object",
2047
+ "description": "A Doc Detective test.",
2048
+ "properties": {
2049
+ "id": {
2050
+ "type": "string",
2051
+ "description": "Unique identifier for the test."
2052
+ },
2053
+ "description": {
2054
+ "type": "string",
2055
+ "description": "Description of the test."
2056
+ },
2057
+ "file": {
2058
+ "type": "string",
2059
+ "description": "Path to the file that the test is associated with."
2060
+ },
2061
+ "detectSteps": {
2062
+ "type": "boolean",
2063
+ "description": "Whether or not to detect steps in input files based on markup regex. Defaults to `true`."
2064
+ },
2065
+ "contexts": {
2066
+ "type": "array",
2067
+ "description": "Application/platform sets to run the test in. Overrides `contexts` defined at the config-level and spec-level.",
2068
+ "items": {
2069
+ "oneOf": [
2070
+ {
2071
+ "title": "context",
2072
+ "type": "object",
2073
+ "description": "An application and supported platforms.\n\nIf no contexts are specified but a context is required by one or more tests, Doc Detective attempts to identify a supported context in the current environment and run tests against it. For browsers, context priority is Firefox > Chrome > Chromium.",
2074
+ "properties": {
2075
+ "app": {
2076
+ "type": "object",
2077
+ "description": "The application to run.",
2078
+ "additionalProperties": false,
2079
+ "required": [
2080
+ "name"
2081
+ ],
2082
+ "properties": {
2083
+ "name": {
2084
+ "type": "string",
2085
+ "description": "Name of the application.",
2086
+ "enum": [
2087
+ "firefox",
2088
+ "chrome"
2089
+ ]
2090
+ },
2091
+ "path": {
2092
+ "type": "string",
2093
+ "description": "Path to the application. If not specified, defaults to typical install paths per platform. If specified but the path is invalid, the context is skipped."
2094
+ },
2095
+ "options": {
2096
+ "type": "object",
2097
+ "description": "Options to pass to the app. Only works when `name` is `firefox` or `chrome`.",
2098
+ "additionalProperties": false,
2099
+ "properties": {
2100
+ "width": {
2101
+ "type": "integer",
2102
+ "description": "Width of the window in pixels."
2103
+ },
2104
+ "height": {
2105
+ "type": "integer",
2106
+ "description": "Height of the window in pixels."
2107
+ },
2108
+ "headless": {
2109
+ "type": "boolean",
2110
+ "description": "If `true`, runs the browser in headless mode."
2111
+ }
2112
+ }
2113
+ }
2114
+ }
2115
+ },
2116
+ "platforms": {
2117
+ "description": "Supported platforms for the application.",
2118
+ "type": "array",
2119
+ "items": {
2120
+ "type": "string",
2121
+ "enum": [
2122
+ "linux",
2123
+ "mac",
2124
+ "windows"
2125
+ ]
2126
+ }
2127
+ }
2128
+ },
2129
+ "required": [
2130
+ "app",
2131
+ "platforms"
2132
+ ],
2133
+ "additionalProperties": false,
2134
+ "examples": [
2135
+ {
2136
+ "app": {
2137
+ "name": "firefox"
2138
+ },
2139
+ "platforms": [
2140
+ "linux"
2141
+ ]
2142
+ },
2143
+ {
2144
+ "app": {
2145
+ "name": "firefox",
2146
+ "options": {
2147
+ "width": 800,
2148
+ "height": 600,
2149
+ "headless": false
2150
+ }
2151
+ },
2152
+ "platforms": [
2153
+ "linux",
2154
+ "windows",
2155
+ "mac"
2156
+ ]
2157
+ },
2158
+ {
2159
+ "app": {
2160
+ "name": "chrome"
2161
+ },
2162
+ "platforms": [
2163
+ "linux",
2164
+ "windows",
2165
+ "mac"
2166
+ ]
2167
+ },
2168
+ {
2169
+ "app": {
2170
+ "name": "firefox",
2171
+ "path": "/usr/bin/firefox"
2172
+ },
2173
+ "platforms": [
2174
+ "linux"
2175
+ ]
2176
+ }
2177
+ ]
2178
+ }
2179
+ ]
2180
+ }
2181
+ },
2182
+ "setup": {
2183
+ "type": "string",
2184
+ "description": "Path to a test specification to perform before this test, while maintaining this test's context. Useful for setting up testing environments. Only the `steps` property is used from the first test in the setup spec."
2185
+ },
2186
+ "cleanup": {
2187
+ "type": "string",
2188
+ "description": "Path to a test specification to perform after this test, while maintaining this test's context. Useful for cleaning up testing environments. Only the `steps` property is used from the first test in the cleanup spec."
2189
+ },
2190
+ "steps": {
2191
+ "description": "Actions to perform as part of the test. Performed in the sequence defined. If one or more actions fail, the test fails.",
2192
+ "type": "array",
2193
+ "minItems": 1,
2194
+ "items": {
2195
+ "anyOf": [
2196
+ {
2197
+ "title": "checkLink",
2198
+ "type": "object",
2199
+ "description": "Check if a URL returns an acceptable status code from a GET request.",
2200
+ "properties": {
2201
+ "id": {
2202
+ "type": "string",
2203
+ "description": "ID of the step."
2204
+ },
2205
+ "description": {
2206
+ "type": "string",
2207
+ "description": "Description of the step."
2208
+ },
2209
+ "action": {
2210
+ "type": "string",
2211
+ "const": "checkLink",
2212
+ "description": "Action to perform."
2213
+ },
2214
+ "url": {
2215
+ "type": "string",
2216
+ "description": "URL to check.",
2217
+ "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
2218
+ "transform": [
2219
+ "trim"
2220
+ ]
2221
+ },
2222
+ "origin": {
2223
+ "type": "string",
2224
+ "description": "Protocol and domain to navigate to. Prepended to `url`.",
2225
+ "transform": [
2226
+ "trim"
2227
+ ]
2228
+ },
2229
+ "statusCodes": {
2230
+ "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
2231
+ "type": "array",
2232
+ "items": {
2233
+ "oneOf": [
2234
+ {
2235
+ "type": "integer"
2236
+ }
2237
+ ]
2238
+ },
2239
+ "default": [
2240
+ 200,
2241
+ 201,
2242
+ 202
2243
+ ]
2244
+ }
2245
+ },
2246
+ "dynamicDefaults": {
2247
+ "id": "uuid"
2248
+ },
2249
+ "required": [
2250
+ "action",
2251
+ "url"
2252
+ ],
2253
+ "additionalProperties": false,
2254
+ "examples": [
2255
+ {
2256
+ "action": "checkLink",
2257
+ "url": "https://www.google.com"
2258
+ },
2259
+ {
2260
+ "action": "checkLink",
2261
+ "url": "https://www.google.com",
2262
+ "statusCodes": [
2263
+ 200
2264
+ ]
2265
+ },
2266
+ {
2267
+ "action": "checkLink",
2268
+ "url": "/search",
2269
+ "origin": "www.google.com",
2270
+ "statusCodes": [
2271
+ 200
2272
+ ]
2273
+ }
2274
+ ]
2275
+ },
2276
+ {
2277
+ "title": "goTo",
2278
+ "type": "object",
2279
+ "description": "Navigate to a specified URL.",
2280
+ "properties": {
2281
+ "id": {
2282
+ "type": "string",
2283
+ "description": "ID of the step."
2284
+ },
2285
+ "description": {
2286
+ "type": "string",
2287
+ "description": "Description of the step."
2288
+ },
2289
+ "action": {
2290
+ "type": "string",
2291
+ "const": "goTo",
2292
+ "description": "Action to perform."
2293
+ },
2294
+ "url": {
2295
+ "type": "string",
2296
+ "description": "URL to navigate to.",
2297
+ "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
2298
+ "transform": [
2299
+ "trim"
2300
+ ]
2301
+ },
2302
+ "origin": {
2303
+ "type": "string",
2304
+ "description": "Protocol and domain to navigate to. Prepended to `url`.",
2305
+ "transform": [
2306
+ "trim"
2307
+ ]
2308
+ }
2309
+ },
2310
+ "dynamicDefaults": {
2311
+ "id": "uuid"
2312
+ },
2313
+ "required": [
2314
+ "action",
2315
+ "url"
2316
+ ],
2317
+ "additionalProperties": false,
2318
+ "examples": [
2319
+ {
2320
+ "action": "goTo",
2321
+ "url": "https://www.google.com"
2322
+ },
2323
+ {
2324
+ "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
2325
+ "description": "This is a test!",
2326
+ "action": "goTo",
2327
+ "url": "https://www.google.com"
2328
+ },
2329
+ {
2330
+ "id": "ddec5e20-2e81-4f38-867c-92c8d9516756",
2331
+ "description": "This is a test!",
2332
+ "action": "goTo",
2333
+ "url": "/search",
2334
+ "origin": "https://www.google.com"
2335
+ }
2336
+ ]
2337
+ },
2338
+ {
2339
+ "title": "httpRequest",
2340
+ "type": "object",
2341
+ "description": "Perform a generic HTTP request, for example to an API.",
2342
+ "properties": {
2343
+ "id": {
2344
+ "type": "string",
2345
+ "description": "ID of the step."
2346
+ },
2347
+ "description": {
2348
+ "type": "string",
2349
+ "description": "Description of the step."
2350
+ },
2351
+ "action": {
2352
+ "type": "string",
2353
+ "const": "httpRequest",
2354
+ "description": "Aciton to perform."
2355
+ },
2356
+ "url": {
2357
+ "type": "string",
2358
+ "description": "URL for the HTTP request.",
2359
+ "pattern": "(^(http://|https://).*|\\$[A-Za-z0-9_]+)",
2360
+ "transform": [
2361
+ "trim"
2362
+ ]
2363
+ },
2364
+ "statusCodes": {
2365
+ "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
2366
+ "type": "array",
2367
+ "items": {
2368
+ "oneOf": [
2369
+ {
2370
+ "type": "integer"
2371
+ }
2372
+ ]
2373
+ },
2374
+ "default": [
2375
+ 200
2376
+ ]
2377
+ },
2378
+ "method": {
2379
+ "type": "string",
2380
+ "description": "Method of the HTTP request",
2381
+ "enum": [
2382
+ "get",
2383
+ "put",
2384
+ "post",
2385
+ "patch",
2386
+ "delete"
2387
+ ],
2388
+ "transform": [
2389
+ "trim",
2390
+ "toEnumCase"
2391
+ ],
2392
+ "default": "get"
2393
+ },
2394
+ "requestHeaders": {
2395
+ "description": "Headers to include in the HTTP request, in key/value format.",
2396
+ "type": "object",
2397
+ "additionalProperties": true,
2398
+ "properties": {},
2399
+ "default": {}
2400
+ },
2401
+ "responseHeaders": {
2402
+ "description": "Headers expected in the response, in key/value format. If one or more `responseHeaders` entries aren't present in the response, the step fails.",
2403
+ "type": "object",
2404
+ "additionalProperties": true,
2405
+ "properties": {},
2406
+ "default": {}
2407
+ },
2408
+ "requestParams": {
2409
+ "description": "URL parameters to include in the HTTP request, in key/value format.",
2410
+ "type": "object",
2411
+ "additionalProperties": true,
2412
+ "default": {},
2413
+ "properties": {}
2414
+ },
2415
+ "responseParams": {
2416
+ "description": "URL parameters expected in the response, in key/value format. If one or more `responseParams` entries aren't present in the response, the step fails.",
2417
+ "type": "object",
2418
+ "additionalProperties": true,
2419
+ "default": {},
2420
+ "properties": {}
2421
+ },
2422
+ "requestData": {
2423
+ "description": "JSON object to include as the body of the HTTP request.",
2424
+ "type": "object",
2425
+ "additionalProperties": true,
2426
+ "default": {},
2427
+ "properties": {}
2428
+ },
2429
+ "responseData": {
2430
+ "description": "JSON object expected in the response. If one or more key/value pairs aren't present in the response, the step fails.",
2431
+ "type": "object",
2432
+ "additionalProperties": true,
2433
+ "default": {},
2434
+ "properties": {}
2435
+ },
2436
+ "envsFromResponseData": {
2437
+ "description": "Environment variables to set based on response variables, as an object of the environment variable name and the jq filter applied to the response data to identify the variable's value.",
2438
+ "type": "array",
2439
+ "default": [],
2440
+ "items": {
2441
+ "oneOf": [
2442
+ {
2443
+ "description": "",
2444
+ "type": "object",
2445
+ "properties": {
2446
+ "name": {
2447
+ "description": "Name of the environment variable to set.",
2448
+ "type": "string"
2449
+ },
2450
+ "jqFilter": {
2451
+ "description": "jq filter to apply to the response data. If the filter doesn't return a value, the environment variable isn't set.",
2452
+ "type": "string"
2453
+ }
2454
+ },
2455
+ "required": [
2456
+ "name",
2457
+ "jqFilter"
2458
+ ]
2459
+ }
2460
+ ]
2461
+ }
2462
+ }
2463
+ },
2464
+ "dynamicDefaults": {
2465
+ "id": "uuid"
2466
+ },
2467
+ "required": [
2468
+ "action",
2469
+ "url"
2470
+ ],
2471
+ "additionalProperties": false,
2472
+ "examples": [
2473
+ {
2474
+ "action": "httpRequest",
2475
+ "url": "https://reqres.in/api/users"
2476
+ },
2477
+ {
2478
+ "action": "httpRequest",
2479
+ "url": "https://reqres.in/api/users/2",
2480
+ "method": "put",
2481
+ "requestData": {
2482
+ "name": "morpheus",
2483
+ "job": "zion resident"
2484
+ }
2485
+ },
2486
+ {
2487
+ "action": "httpRequest",
2488
+ "url": "https://reqres.in/api/users",
2489
+ "method": "post",
2490
+ "requestData": {
2491
+ "name": "morpheus",
2492
+ "job": "leader"
2493
+ },
2494
+ "responseData": {
2495
+ "name": "morpheus",
2496
+ "job": "leader"
2497
+ },
2498
+ "statusCodes": [
2499
+ 200,
2500
+ 201
2501
+ ]
2502
+ },
2503
+ {
2504
+ "action": "httpRequest",
2505
+ "url": "https://www.api-server.com",
2506
+ "method": "post",
2507
+ "requestHeaders": {
2508
+ "header": "value"
2509
+ },
2510
+ "requestParams": {
2511
+ "param": "value"
2512
+ },
2513
+ "requestData": {
2514
+ "field": "value"
2515
+ },
2516
+ "responseHeaders": {
2517
+ "header": "value"
2518
+ },
2519
+ "responseData": {
2520
+ "field": "value"
2521
+ },
2522
+ "statusCodes": [
2523
+ 200
2524
+ ]
2525
+ }
2526
+ ]
2527
+ },
2528
+ {
2529
+ "title": "runShell",
2530
+ "type": "object",
2531
+ "description": "Perform a native shell command.",
2532
+ "properties": {
2533
+ "id": {
2534
+ "type": "string",
2535
+ "description": "ID of the step."
2536
+ },
2537
+ "description": {
2538
+ "type": "string",
2539
+ "description": "Description of the step."
2540
+ },
2541
+ "action": {
2542
+ "type": "string",
2543
+ "const": "runShell",
2544
+ "description": "The action to perform."
2545
+ },
2546
+ "command": {
2547
+ "type": "string",
2548
+ "description": "Command to perform in the machine's default shell."
2549
+ },
2550
+ "args": {
2551
+ "type": "array",
2552
+ "description": "Arguments for the command.",
2553
+ "items": {
2554
+ "oneOf": [
2555
+ {
2556
+ "type": "string"
2557
+ }
2558
+ ]
2559
+ },
2560
+ "default": []
2561
+ }
2562
+ },
2563
+ "dynamicDefaults": {
2564
+ "id": "uuid"
2565
+ },
2566
+ "additionalProperties": false,
2567
+ "required": [
2568
+ "action",
2569
+ "command"
2570
+ ],
2571
+ "examples": [
2572
+ {
2573
+ "action": "runShell",
2574
+ "command": "echo",
2575
+ "args": [
2576
+ "$USER"
2577
+ ]
2578
+ },
2579
+ {
2580
+ "action": "runShell",
2581
+ "command": "echo",
2582
+ "args": [
2583
+ "hello-world"
2584
+ ],
2585
+ "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
2586
+ "description": "This is a test!"
2587
+ }
2588
+ ]
2589
+ },
2590
+ {
2591
+ "title": "saveScreenshot",
2592
+ "type": "object",
2593
+ "description": "Takes a screenshot in PNG format.",
2594
+ "properties": {
2595
+ "id": {
2596
+ "type": "string",
2597
+ "description": "ID of the step."
2598
+ },
2599
+ "description": {
2600
+ "type": "string",
2601
+ "description": "Description of the step."
2602
+ },
2603
+ "action": {
2604
+ "type": "string",
2605
+ "const": "saveScreenshot",
2606
+ "description": "The action to perform."
2607
+ },
2608
+ "path": {
2609
+ "type": "string",
2610
+ "description": "Relative file path of the PNG file from `directory`. If not specified, the file name is the ID of the step.",
2611
+ "pattern": "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)"
2612
+ },
2613
+ "directory": {
2614
+ "type": "string",
2615
+ "description": "Directory of the PNG file. Attempts to creatr the directory if it doesn't exist. If not specified, the directory is your media directory."
2616
+ },
2617
+ "maxVariation": {
2618
+ "type": "number",
2619
+ "description": "Allowed variation in percentage of pixels between the new screenshot and the exisitng screenshot at `path`. If the difference between the new screenshot and the existing screenshot is greater than `maxVariation`, the step fails. If a screenshot doesn't exist at `path`, this value is ignored.",
2620
+ "minimum": 0,
2621
+ "maximum": 100
2622
+ },
2623
+ "overwrite": {
2624
+ "type": "string",
2625
+ "description": "If `true`, overwrites the existing screenshot at `path` if it exists.\nIf `byVariation`, overwrites the existing screenshot at `path` if the difference between the new screenshot and the existing screenshot is greater than `maxVariation`.",
2626
+ "enum": [
2627
+ "true",
2628
+ "false",
2629
+ "byVariation"
2630
+ ],
2631
+ "default": false
2632
+ }
2633
+ },
2634
+ "dynamicDefaults": {
2635
+ "id": "uuid"
2636
+ },
2637
+ "required": [
2638
+ "action"
2639
+ ],
2640
+ "additionalProperties": false,
2641
+ "examples": [
2642
+ {
2643
+ "action": "saveScreenshot"
2644
+ },
2645
+ {
2646
+ "action": "saveScreenshot",
2647
+ "path": "results.png"
2648
+ },
2649
+ {
2650
+ "action": "saveScreenshot",
2651
+ "path": "results.png",
2652
+ "directory": "static/images"
2653
+ },
2654
+ {
2655
+ "action": "saveScreenshot",
2656
+ "path": "results.png",
2657
+ "directory": "static/images",
2658
+ "maxVariation": 10,
2659
+ "overwrite": "byVariation"
2660
+ }
2661
+ ]
2662
+ },
2663
+ {
2664
+ "title": "setVariables",
2665
+ "type": "object",
2666
+ "description": "Load environment variables from a `.env` file.",
2667
+ "properties": {
2668
+ "id": {
2669
+ "type": "string",
2670
+ "description": "ID of the step."
2671
+ },
2672
+ "description": {
2673
+ "type": "string",
2674
+ "description": "Description of the step."
2675
+ },
2676
+ "action": {
2677
+ "type": "string",
2678
+ "const": "setVariables",
2679
+ "description": "Action to perform."
2680
+ },
2681
+ "path": {
2682
+ "type": "string",
2683
+ "description": "Path to the `.env` file."
2684
+ }
2685
+ },
2686
+ "dynamicDefaults": {
2687
+ "id": "uuid"
2688
+ },
2689
+ "required": [
2690
+ "action",
2691
+ "path"
2692
+ ],
2693
+ "additionalProperties": false,
2694
+ "examples": [
2695
+ {
2696
+ "action": "setVariables",
2697
+ "path": ".env"
2698
+ }
2699
+ ]
2700
+ },
2701
+ {
2702
+ "title": "typeKeys",
2703
+ "type": "object",
2704
+ "description": "Type keys. To type special keys, begin and end the string with `$` and use the [special key's enum](). For example, to type the Escape key, enter `$ESCAPE$`.",
2705
+ "properties": {
2706
+ "id": {
2707
+ "type": "string",
2708
+ "description": "ID of the step."
2709
+ },
2710
+ "description": {
2711
+ "type": "string",
2712
+ "description": "Description of the step."
2713
+ },
2714
+ "action": {
2715
+ "type": "string",
2716
+ "const": "typeKeys",
2717
+ "description": "The action to perform."
2718
+ },
2719
+ "keys": {
2720
+ "description": "String of keys to enter.",
2721
+ "anyOf": [
2722
+ {
2723
+ "type": "string"
2724
+ },
2725
+ {
2726
+ "type": "array",
2727
+ "items": {
2728
+ "oneOf": [
2729
+ {
2730
+ "type": "string"
2731
+ }
2732
+ ]
2733
+ }
2734
+ }
2735
+ ]
2736
+ }
2737
+ },
2738
+ "dynamicDefaults": {
2739
+ "id": "uuid"
2740
+ },
2741
+ "required": [
2742
+ "action",
2743
+ "keys"
2744
+ ],
2745
+ "additionalProperties": false,
2746
+ "examples": [
2747
+ {
2748
+ "action": "typeKeys",
2749
+ "keys": "kittens"
2750
+ },
2751
+ {
2752
+ "action": "typeKeys",
2753
+ "keys": [
2754
+ "$ENTER$"
2755
+ ]
2756
+ }
2757
+ ]
2758
+ },
2759
+ {
2760
+ "title": "find",
2761
+ "type": "object",
2762
+ "description": "Check if an element exists with the specified CSS selector.",
2763
+ "properties": {
2764
+ "id": {
2765
+ "type": "string",
2766
+ "description": "ID of the step."
2767
+ },
2768
+ "description": {
2769
+ "type": "string",
2770
+ "description": "Description of the step."
2771
+ },
2772
+ "action": {
2773
+ "type": "string",
2774
+ "const": "find",
2775
+ "description": "Action to perform."
2776
+ },
2777
+ "selector": {
2778
+ "description": "Selector that uniquely identifies the element.",
2779
+ "type": "string"
2780
+ },
2781
+ "timeout": {
2782
+ "type": "integer",
2783
+ "description": "Max duration in milliseconds to wait for the element to exist.",
2784
+ "default": 5000
2785
+ },
2786
+ "matchText": {
2787
+ "type": "string",
2788
+ "description": "Text that the element should contain. If the element doesn't contain the text, the step fails."
2789
+ },
2790
+ "moveTo": {
2791
+ "type": "boolean",
2792
+ "description": "Move to the element. If the element isn't visible, it's scrolled into view. Only runs the if the test is being recorded."
2793
+ },
2794
+ "click": {
2795
+ "type": "boolean",
2796
+ "description": "Click the element."
2797
+ },
2798
+ "typeKeys": {
2799
+ "description": "Type keys after finding the element. Either a string or an object with a `keys` field as defined in [`typeKeys`](/reference/schemas/typeKeys).<br><br>To type in the element, make the element active with the `click` parameter.",
2800
+ "oneOf": [
2801
+ {
2802
+ "type": "string"
2803
+ },
2804
+ {
2805
+ "type": "object",
2806
+ "additionalProperties": false,
2807
+ "properties": {
2808
+ "keys": {
2809
+ "description": "String of keys to enter.",
2810
+ "anyOf": [
2811
+ {
2812
+ "type": "string"
2813
+ },
2814
+ {
2815
+ "type": "array",
2816
+ "items": {
2817
+ "oneOf": [
2818
+ {
2819
+ "type": "string"
2820
+ }
2821
+ ]
2822
+ }
2823
+ }
2824
+ ]
2825
+ }
2826
+ }
2827
+ }
2828
+ ]
2829
+ }
2830
+ },
2831
+ "required": [
2832
+ "action",
2833
+ "selector"
2834
+ ],
2835
+ "dynamicDefaults": {
2836
+ "id": "uuid"
2837
+ },
2838
+ "additionalProperties": false,
2839
+ "examples": [
2840
+ {
2841
+ "action": "find",
2842
+ "selector": "[title=Search]"
2843
+ },
2844
+ {
2845
+ "action": "find",
2846
+ "selector": "[title=Search]",
2847
+ "timeout": 10000,
2848
+ "matchText": "Search",
2849
+ "moveTo": true,
2850
+ "click": true,
2851
+ "typeKeys": "shorthair cat"
2852
+ }
2853
+ ]
2854
+ },
2855
+ {
2856
+ "title": "wait",
2857
+ "type": "object",
2858
+ "description": "Pause before performing the next action.",
2859
+ "properties": {
2860
+ "id": {
2861
+ "type": "string",
2862
+ "description": "ID of the step."
2863
+ },
2864
+ "description": {
2865
+ "type": "string",
2866
+ "description": "Description of the step."
2867
+ },
2868
+ "action": {
2869
+ "type": "string",
2870
+ "const": "wait",
2871
+ "description": "The action to perform."
2872
+ },
2873
+ "duration": {
2874
+ "type": "number",
2875
+ "description": "Milliseconds to wait.",
2876
+ "default": 5000
2877
+ }
2878
+ },
2879
+ "dynamicDefaults": {
2880
+ "id": "uuid"
2881
+ },
2882
+ "required": [
2883
+ "action"
2884
+ ],
2885
+ "additionalProperties": false,
2886
+ "examples": [
2887
+ {
2888
+ "action": "wait"
2889
+ },
2890
+ {
2891
+ "action": "wait",
2892
+ "duration": 5000
2893
+ }
2894
+ ]
2895
+ }
2896
+ ]
2897
+ }
2898
+ }
2899
+ },
2900
+ "dynamicDefaults": {
2901
+ "id": "uuid"
2902
+ },
2903
+ "required": [
2904
+ "steps"
2905
+ ],
2906
+ "additionalProperties": false,
2907
+ "examples": [
2908
+ {
2909
+ "steps": [
2910
+ {
2911
+ "action": "checkLink",
2912
+ "url": "https://www.duckduckgo.com"
2913
+ }
2914
+ ]
2915
+ },
2916
+ {
2917
+ "steps": [
2918
+ {
2919
+ "action": "goTo",
2920
+ "url": "https://www.duckduckgo.com"
2921
+ },
2922
+ {
2923
+ "action": "find",
2924
+ "selector": "[title=Search]",
2925
+ "click": true,
2926
+ "typeKeys": {
2927
+ "keys": [
2928
+ "shorthair cats",
2929
+ "$ENTER$"
2930
+ ]
2931
+ }
2932
+ }
2933
+ ]
2934
+ },
2935
+ {
2936
+ "id": "Do all the things! - Test",
2937
+ "description": "This test includes every property across all actions.",
2938
+ "contexts": [
2939
+ {
2940
+ "app": {
2941
+ "name": "firefox",
2942
+ "path": "/usr/bin/firefox"
2943
+ },
2944
+ "platforms": [
2945
+ "linux"
2946
+ ]
2947
+ }
2948
+ ],
2949
+ "setup": "setup.json",
2950
+ "cleanup": "cleanup.json",
2951
+ "steps": [
2952
+ {
2953
+ "action": "setVariables",
2954
+ "path": ".env"
2955
+ },
2956
+ {
2957
+ "action": "runShell",
2958
+ "command": "echo",
2959
+ "args": [
2960
+ "$USER"
2961
+ ]
2962
+ },
2963
+ {
2964
+ "action": "checkLink",
2965
+ "url": "https://www.duckduckgo.com"
2966
+ },
2967
+ {
2968
+ "action": "httpRequest",
2969
+ "url": "https://reqres.in/api/users",
2970
+ "method": "post",
2971
+ "requestData": {
2972
+ "name": "morpheus",
2973
+ "job": "leader"
2974
+ },
2975
+ "responseData": {
2976
+ "name": "morpheus",
2977
+ "job": "leader"
2978
+ },
2979
+ "statusCodes": [
2980
+ 200,
2981
+ 201
2982
+ ]
2983
+ },
2984
+ {
2985
+ "action": "goTo",
2986
+ "url": "https://www.duckduckgo.com"
2987
+ },
2988
+ {
2989
+ "action": "find",
2990
+ "selector": "[title=Search]",
2991
+ "timeout": 10000,
2992
+ "matchText": "Search",
2993
+ "moveTo": true,
2994
+ "click": true,
2995
+ "typeKeys": {
2996
+ "keys": [
2997
+ "shorthair cat"
2998
+ ]
2999
+ }
3000
+ },
3001
+ {
3002
+ "action": "typeKeys",
3003
+ "keys": [
3004
+ "$ENTER$"
3005
+ ]
3006
+ },
3007
+ {
3008
+ "action": "saveScreenshot"
3009
+ }
3010
+ ]
3011
+ }
3012
+ ]
3013
+ }
3014
+ ]
3015
+ }
3016
+ }
3017
+ },
3018
+ "required": [
3019
+ "tests"
3020
+ ],
3021
+ "examples": [
3022
+ {
3023
+ "tests": [
3024
+ {
3025
+ "steps": [
3026
+ {
3027
+ "action": "checkLink",
3028
+ "url": "https://www.duckduckgo.com"
3029
+ }
3030
+ ]
3031
+ }
3032
+ ]
3033
+ },
3034
+ {
3035
+ "id": "Do all the things! - Spec",
3036
+ "contexts": [
3037
+ {
3038
+ "app": {
3039
+ "name": "chrome",
3040
+ "path": "/usr/bin/firefox"
3041
+ },
3042
+ "platforms": [
3043
+ "windows",
3044
+ "mac"
3045
+ ]
3046
+ }
3047
+ ],
3048
+ "tests": [
3049
+ {
3050
+ "id": "Do all the things! - Test",
3051
+ "description": "This test includes nearly every property across all actions.",
3052
+ "contexts": [
3053
+ {
3054
+ "app": {
3055
+ "name": "firefox",
3056
+ "path": "/usr/bin/firefox"
3057
+ },
3058
+ "platforms": [
3059
+ "linux"
3060
+ ]
3061
+ }
3062
+ ],
3063
+ "steps": [
3064
+ {
3065
+ "action": "setVariables",
3066
+ "path": ".env"
3067
+ },
3068
+ {
3069
+ "action": "runShell",
3070
+ "command": "echo",
3071
+ "args": [
3072
+ "$USER"
3073
+ ]
3074
+ },
3075
+ {
3076
+ "action": "checkLink",
3077
+ "url": "https://www.duckduckgo.com"
3078
+ },
3079
+ {
3080
+ "action": "httpRequest",
3081
+ "url": "https://reqres.in/api/users",
3082
+ "method": "post",
3083
+ "requestData": {
3084
+ "name": "morpheus",
3085
+ "job": "leader"
3086
+ },
3087
+ "responseData": {
3088
+ "name": "morpheus",
3089
+ "job": "leader"
3090
+ },
3091
+ "statusCodes": [
3092
+ 200,
3093
+ 201
3094
+ ]
3095
+ },
3096
+ {
3097
+ "action": "goTo",
3098
+ "url": "https://www.duckduckgo.com"
3099
+ },
3100
+ {
3101
+ "action": "find",
3102
+ "selector": "[title=Search]",
3103
+ "timeout": 10000,
3104
+ "matchText": "Search",
3105
+ "moveTo": true,
3106
+ "click": true,
3107
+ "typeKeys": {
3108
+ "keys": [
3109
+ "shorthair cat"
3110
+ ]
3111
+ }
3112
+ },
3113
+ {
3114
+ "action": "typeKeys",
3115
+ "keys": [
3116
+ "$ENTER$"
3117
+ ]
3118
+ },
3119
+ {
3120
+ "action": "saveScreenshot"
3121
+ }
3122
+ ]
3123
+ }
3124
+ ]
3125
+ }
3126
+ ]
3127
+ },
3128
+ "test_v2": {
3129
+ "title": "test",
3130
+ "type": "object",
3131
+ "description": "A Doc Detective test.",
3132
+ "properties": {
3133
+ "id": {
3134
+ "type": "string",
3135
+ "description": "Unique identifier for the test."
3136
+ },
3137
+ "description": {
3138
+ "type": "string",
3139
+ "description": "Description of the test."
3140
+ },
3141
+ "file": {
3142
+ "type": "string",
3143
+ "description": "Path to the file that the test is associated with."
3144
+ },
3145
+ "detectSteps": {
3146
+ "type": "boolean",
3147
+ "description": "Whether or not to detect steps in input files based on markup regex. Defaults to `true`."
3148
+ },
3149
+ "contexts": {
3150
+ "type": "array",
3151
+ "description": "Application/platform sets to run the test in. Overrides `contexts` defined at the config-level and spec-level.",
3152
+ "items": {
3153
+ "oneOf": [
3154
+ {
3155
+ "title": "context",
3156
+ "type": "object",
3157
+ "description": "An application and supported platforms.\n\nIf no contexts are specified but a context is required by one or more tests, Doc Detective attempts to identify a supported context in the current environment and run tests against it. For browsers, context priority is Firefox > Chrome > Chromium.",
3158
+ "properties": {
3159
+ "app": {
3160
+ "type": "object",
3161
+ "description": "The application to run.",
3162
+ "additionalProperties": false,
3163
+ "required": [
3164
+ "name"
3165
+ ],
3166
+ "properties": {
3167
+ "name": {
3168
+ "type": "string",
3169
+ "description": "Name of the application.",
3170
+ "enum": [
3171
+ "firefox",
3172
+ "chrome"
3173
+ ]
3174
+ },
3175
+ "path": {
3176
+ "type": "string",
3177
+ "description": "Path to the application. If not specified, defaults to typical install paths per platform. If specified but the path is invalid, the context is skipped."
3178
+ },
3179
+ "options": {
3180
+ "type": "object",
3181
+ "description": "Options to pass to the app. Only works when `name` is `firefox` or `chrome`.",
3182
+ "additionalProperties": false,
3183
+ "properties": {
3184
+ "width": {
3185
+ "type": "integer",
3186
+ "description": "Width of the window in pixels."
3187
+ },
3188
+ "height": {
3189
+ "type": "integer",
3190
+ "description": "Height of the window in pixels."
3191
+ },
3192
+ "headless": {
3193
+ "type": "boolean",
3194
+ "description": "If `true`, runs the browser in headless mode."
3195
+ }
3196
+ }
3197
+ }
3198
+ }
3199
+ },
3200
+ "platforms": {
3201
+ "description": "Supported platforms for the application.",
3202
+ "type": "array",
3203
+ "items": {
3204
+ "type": "string",
3205
+ "enum": [
3206
+ "linux",
3207
+ "mac",
3208
+ "windows"
3209
+ ]
3210
+ }
3211
+ }
3212
+ },
3213
+ "required": [
3214
+ "app",
3215
+ "platforms"
3216
+ ],
3217
+ "additionalProperties": false,
3218
+ "examples": [
3219
+ {
3220
+ "app": {
3221
+ "name": "firefox"
3222
+ },
3223
+ "platforms": [
3224
+ "linux"
3225
+ ]
3226
+ },
3227
+ {
3228
+ "app": {
3229
+ "name": "firefox",
3230
+ "options": {
3231
+ "width": 800,
3232
+ "height": 600,
3233
+ "headless": false
3234
+ }
3235
+ },
3236
+ "platforms": [
3237
+ "linux",
3238
+ "windows",
3239
+ "mac"
3240
+ ]
3241
+ },
3242
+ {
3243
+ "app": {
3244
+ "name": "chrome"
3245
+ },
3246
+ "platforms": [
3247
+ "linux",
3248
+ "windows",
3249
+ "mac"
3250
+ ]
3251
+ },
3252
+ {
3253
+ "app": {
3254
+ "name": "firefox",
3255
+ "path": "/usr/bin/firefox"
3256
+ },
3257
+ "platforms": [
3258
+ "linux"
3259
+ ]
3260
+ }
3261
+ ]
3262
+ }
3263
+ ]
3264
+ }
3265
+ },
3266
+ "setup": {
3267
+ "type": "string",
3268
+ "description": "Path to a test specification to perform before this test, while maintaining this test's context. Useful for setting up testing environments. Only the `steps` property is used from the first test in the setup spec."
3269
+ },
3270
+ "cleanup": {
3271
+ "type": "string",
3272
+ "description": "Path to a test specification to perform after this test, while maintaining this test's context. Useful for cleaning up testing environments. Only the `steps` property is used from the first test in the cleanup spec."
3273
+ },
3274
+ "steps": {
3275
+ "description": "Actions to perform as part of the test. Performed in the sequence defined. If one or more actions fail, the test fails.",
3276
+ "type": "array",
3277
+ "minItems": 1,
3278
+ "items": {
3279
+ "anyOf": [
3280
+ {
3281
+ "title": "checkLink",
3282
+ "type": "object",
3283
+ "description": "Check if a URL returns an acceptable status code from a GET request.",
3284
+ "properties": {
3285
+ "id": {
3286
+ "type": "string",
3287
+ "description": "ID of the step."
3288
+ },
3289
+ "description": {
3290
+ "type": "string",
3291
+ "description": "Description of the step."
3292
+ },
3293
+ "action": {
3294
+ "type": "string",
3295
+ "const": "checkLink",
3296
+ "description": "Action to perform."
3297
+ },
3298
+ "url": {
3299
+ "type": "string",
3300
+ "description": "URL to check.",
3301
+ "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
3302
+ "transform": [
3303
+ "trim"
3304
+ ]
3305
+ },
3306
+ "origin": {
3307
+ "type": "string",
3308
+ "description": "Protocol and domain to navigate to. Prepended to `url`.",
3309
+ "transform": [
3310
+ "trim"
3311
+ ]
3312
+ },
3313
+ "statusCodes": {
3314
+ "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
3315
+ "type": "array",
3316
+ "items": {
3317
+ "oneOf": [
3318
+ {
3319
+ "type": "integer"
3320
+ }
3321
+ ]
3322
+ },
3323
+ "default": [
3324
+ 200,
3325
+ 201,
3326
+ 202
3327
+ ]
3328
+ }
3329
+ },
3330
+ "dynamicDefaults": {
3331
+ "id": "uuid"
3332
+ },
3333
+ "required": [
3334
+ "action",
3335
+ "url"
3336
+ ],
3337
+ "additionalProperties": false,
3338
+ "examples": [
3339
+ {
3340
+ "action": "checkLink",
3341
+ "url": "https://www.google.com"
3342
+ },
3343
+ {
3344
+ "action": "checkLink",
3345
+ "url": "https://www.google.com",
3346
+ "statusCodes": [
3347
+ 200
3348
+ ]
3349
+ },
3350
+ {
3351
+ "action": "checkLink",
3352
+ "url": "/search",
3353
+ "origin": "www.google.com",
3354
+ "statusCodes": [
3355
+ 200
3356
+ ]
3357
+ }
3358
+ ]
3359
+ },
3360
+ {
3361
+ "title": "goTo",
3362
+ "type": "object",
3363
+ "description": "Navigate to a specified URL.",
3364
+ "properties": {
3365
+ "id": {
3366
+ "type": "string",
3367
+ "description": "ID of the step."
3368
+ },
3369
+ "description": {
3370
+ "type": "string",
3371
+ "description": "Description of the step."
3372
+ },
3373
+ "action": {
3374
+ "type": "string",
3375
+ "const": "goTo",
3376
+ "description": "Action to perform."
3377
+ },
3378
+ "url": {
3379
+ "type": "string",
3380
+ "description": "URL to navigate to.",
3381
+ "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
3382
+ "transform": [
3383
+ "trim"
3384
+ ]
3385
+ },
3386
+ "origin": {
3387
+ "type": "string",
3388
+ "description": "Protocol and domain to navigate to. Prepended to `url`.",
3389
+ "transform": [
3390
+ "trim"
3391
+ ]
3392
+ }
3393
+ },
3394
+ "dynamicDefaults": {
3395
+ "id": "uuid"
3396
+ },
3397
+ "required": [
3398
+ "action",
3399
+ "url"
3400
+ ],
3401
+ "additionalProperties": false,
3402
+ "examples": [
3403
+ {
3404
+ "action": "goTo",
3405
+ "url": "https://www.google.com"
3406
+ },
3407
+ {
3408
+ "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
3409
+ "description": "This is a test!",
3410
+ "action": "goTo",
3411
+ "url": "https://www.google.com"
3412
+ },
3413
+ {
3414
+ "id": "ddec5e20-2e81-4f38-867c-92c8d9516756",
3415
+ "description": "This is a test!",
3416
+ "action": "goTo",
3417
+ "url": "/search",
3418
+ "origin": "https://www.google.com"
3419
+ }
3420
+ ]
3421
+ },
3422
+ {
3423
+ "title": "httpRequest",
3424
+ "type": "object",
3425
+ "description": "Perform a generic HTTP request, for example to an API.",
3426
+ "properties": {
3427
+ "id": {
3428
+ "type": "string",
3429
+ "description": "ID of the step."
3430
+ },
3431
+ "description": {
3432
+ "type": "string",
3433
+ "description": "Description of the step."
3434
+ },
3435
+ "action": {
3436
+ "type": "string",
3437
+ "const": "httpRequest",
3438
+ "description": "Aciton to perform."
3439
+ },
3440
+ "url": {
3441
+ "type": "string",
3442
+ "description": "URL for the HTTP request.",
3443
+ "pattern": "(^(http://|https://).*|\\$[A-Za-z0-9_]+)",
3444
+ "transform": [
3445
+ "trim"
3446
+ ]
3447
+ },
3448
+ "statusCodes": {
3449
+ "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
3450
+ "type": "array",
3451
+ "items": {
3452
+ "oneOf": [
3453
+ {
3454
+ "type": "integer"
3455
+ }
3456
+ ]
3457
+ },
3458
+ "default": [
3459
+ 200
3460
+ ]
3461
+ },
3462
+ "method": {
3463
+ "type": "string",
3464
+ "description": "Method of the HTTP request",
3465
+ "enum": [
3466
+ "get",
3467
+ "put",
3468
+ "post",
3469
+ "patch",
3470
+ "delete"
3471
+ ],
3472
+ "transform": [
3473
+ "trim",
3474
+ "toEnumCase"
3475
+ ],
3476
+ "default": "get"
3477
+ },
3478
+ "requestHeaders": {
3479
+ "description": "Headers to include in the HTTP request, in key/value format.",
3480
+ "type": "object",
3481
+ "additionalProperties": true,
3482
+ "properties": {},
3483
+ "default": {}
3484
+ },
3485
+ "responseHeaders": {
3486
+ "description": "Headers expected in the response, in key/value format. If one or more `responseHeaders` entries aren't present in the response, the step fails.",
3487
+ "type": "object",
3488
+ "additionalProperties": true,
3489
+ "properties": {},
3490
+ "default": {}
3491
+ },
3492
+ "requestParams": {
3493
+ "description": "URL parameters to include in the HTTP request, in key/value format.",
3494
+ "type": "object",
3495
+ "additionalProperties": true,
3496
+ "default": {},
3497
+ "properties": {}
3498
+ },
3499
+ "responseParams": {
3500
+ "description": "URL parameters expected in the response, in key/value format. If one or more `responseParams` entries aren't present in the response, the step fails.",
3501
+ "type": "object",
3502
+ "additionalProperties": true,
3503
+ "default": {},
3504
+ "properties": {}
3505
+ },
3506
+ "requestData": {
3507
+ "description": "JSON object to include as the body of the HTTP request.",
3508
+ "type": "object",
3509
+ "additionalProperties": true,
3510
+ "default": {},
3511
+ "properties": {}
3512
+ },
3513
+ "responseData": {
3514
+ "description": "JSON object expected in the response. If one or more key/value pairs aren't present in the response, the step fails.",
3515
+ "type": "object",
3516
+ "additionalProperties": true,
3517
+ "default": {},
3518
+ "properties": {}
3519
+ },
3520
+ "envsFromResponseData": {
3521
+ "description": "Environment variables to set based on response variables, as an object of the environment variable name and the jq filter applied to the response data to identify the variable's value.",
3522
+ "type": "array",
3523
+ "default": [],
3524
+ "items": {
3525
+ "oneOf": [
3526
+ {
3527
+ "description": "",
3528
+ "type": "object",
3529
+ "properties": {
3530
+ "name": {
3531
+ "description": "Name of the environment variable to set.",
3532
+ "type": "string"
3533
+ },
3534
+ "jqFilter": {
3535
+ "description": "jq filter to apply to the response data. If the filter doesn't return a value, the environment variable isn't set.",
3536
+ "type": "string"
3537
+ }
3538
+ },
3539
+ "required": [
3540
+ "name",
3541
+ "jqFilter"
3542
+ ]
3543
+ }
3544
+ ]
3545
+ }
3546
+ }
3547
+ },
3548
+ "dynamicDefaults": {
3549
+ "id": "uuid"
3550
+ },
3551
+ "required": [
3552
+ "action",
3553
+ "url"
3554
+ ],
3555
+ "additionalProperties": false,
3556
+ "examples": [
3557
+ {
3558
+ "action": "httpRequest",
3559
+ "url": "https://reqres.in/api/users"
3560
+ },
3561
+ {
3562
+ "action": "httpRequest",
3563
+ "url": "https://reqres.in/api/users/2",
3564
+ "method": "put",
3565
+ "requestData": {
3566
+ "name": "morpheus",
3567
+ "job": "zion resident"
3568
+ }
3569
+ },
3570
+ {
3571
+ "action": "httpRequest",
3572
+ "url": "https://reqres.in/api/users",
3573
+ "method": "post",
3574
+ "requestData": {
3575
+ "name": "morpheus",
3576
+ "job": "leader"
3577
+ },
3578
+ "responseData": {
3579
+ "name": "morpheus",
3580
+ "job": "leader"
3581
+ },
3582
+ "statusCodes": [
3583
+ 200,
3584
+ 201
3585
+ ]
3586
+ },
3587
+ {
3588
+ "action": "httpRequest",
3589
+ "url": "https://www.api-server.com",
3590
+ "method": "post",
3591
+ "requestHeaders": {
3592
+ "header": "value"
3593
+ },
3594
+ "requestParams": {
3595
+ "param": "value"
3596
+ },
3597
+ "requestData": {
3598
+ "field": "value"
3599
+ },
3600
+ "responseHeaders": {
3601
+ "header": "value"
3602
+ },
3603
+ "responseData": {
3604
+ "field": "value"
3605
+ },
3606
+ "statusCodes": [
3607
+ 200
3608
+ ]
3609
+ }
3610
+ ]
3611
+ },
3612
+ {
3613
+ "title": "runShell",
3614
+ "type": "object",
3615
+ "description": "Perform a native shell command.",
3616
+ "properties": {
3617
+ "id": {
3618
+ "type": "string",
3619
+ "description": "ID of the step."
3620
+ },
3621
+ "description": {
3622
+ "type": "string",
3623
+ "description": "Description of the step."
3624
+ },
3625
+ "action": {
3626
+ "type": "string",
3627
+ "const": "runShell",
3628
+ "description": "The action to perform."
3629
+ },
3630
+ "command": {
3631
+ "type": "string",
3632
+ "description": "Command to perform in the machine's default shell."
3633
+ },
3634
+ "args": {
3635
+ "type": "array",
3636
+ "description": "Arguments for the command.",
3637
+ "items": {
3638
+ "oneOf": [
3639
+ {
3640
+ "type": "string"
3641
+ }
3642
+ ]
3643
+ },
3644
+ "default": []
3645
+ }
3646
+ },
3647
+ "dynamicDefaults": {
3648
+ "id": "uuid"
3649
+ },
3650
+ "additionalProperties": false,
3651
+ "required": [
3652
+ "action",
3653
+ "command"
3654
+ ],
3655
+ "examples": [
3656
+ {
3657
+ "action": "runShell",
3658
+ "command": "echo",
3659
+ "args": [
3660
+ "$USER"
3661
+ ]
3662
+ },
3663
+ {
3664
+ "action": "runShell",
3665
+ "command": "echo",
3666
+ "args": [
3667
+ "hello-world"
3668
+ ],
3669
+ "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
3670
+ "description": "This is a test!"
3671
+ }
3672
+ ]
3673
+ },
3674
+ {
3675
+ "title": "saveScreenshot",
3676
+ "type": "object",
3677
+ "description": "Takes a screenshot in PNG format.",
3678
+ "properties": {
3679
+ "id": {
3680
+ "type": "string",
3681
+ "description": "ID of the step."
3682
+ },
3683
+ "description": {
3684
+ "type": "string",
3685
+ "description": "Description of the step."
3686
+ },
3687
+ "action": {
3688
+ "type": "string",
3689
+ "const": "saveScreenshot",
3690
+ "description": "The action to perform."
3691
+ },
3692
+ "path": {
3693
+ "type": "string",
3694
+ "description": "Relative file path of the PNG file from `directory`. If not specified, the file name is the ID of the step.",
3695
+ "pattern": "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)"
3696
+ },
3697
+ "directory": {
3698
+ "type": "string",
3699
+ "description": "Directory of the PNG file. Attempts to creatr the directory if it doesn't exist. If not specified, the directory is your media directory."
3700
+ },
3701
+ "maxVariation": {
3702
+ "type": "number",
3703
+ "description": "Allowed variation in percentage of pixels between the new screenshot and the exisitng screenshot at `path`. If the difference between the new screenshot and the existing screenshot is greater than `maxVariation`, the step fails. If a screenshot doesn't exist at `path`, this value is ignored.",
3704
+ "minimum": 0,
3705
+ "maximum": 100
3706
+ },
3707
+ "overwrite": {
3708
+ "type": "string",
3709
+ "description": "If `true`, overwrites the existing screenshot at `path` if it exists.\nIf `byVariation`, overwrites the existing screenshot at `path` if the difference between the new screenshot and the existing screenshot is greater than `maxVariation`.",
3710
+ "enum": [
3711
+ "true",
3712
+ "false",
3713
+ "byVariation"
3714
+ ],
3715
+ "default": false
3716
+ }
3717
+ },
3718
+ "dynamicDefaults": {
3719
+ "id": "uuid"
3720
+ },
3721
+ "required": [
3722
+ "action"
3723
+ ],
3724
+ "additionalProperties": false,
3725
+ "examples": [
3726
+ {
3727
+ "action": "saveScreenshot"
3728
+ },
3729
+ {
3730
+ "action": "saveScreenshot",
3731
+ "path": "results.png"
3732
+ },
3733
+ {
3734
+ "action": "saveScreenshot",
3735
+ "path": "results.png",
3736
+ "directory": "static/images"
3737
+ },
3738
+ {
3739
+ "action": "saveScreenshot",
3740
+ "path": "results.png",
3741
+ "directory": "static/images",
3742
+ "maxVariation": 10,
3743
+ "overwrite": "byVariation"
3744
+ }
3745
+ ]
3746
+ },
3747
+ {
3748
+ "title": "setVariables",
3749
+ "type": "object",
3750
+ "description": "Load environment variables from a `.env` file.",
3751
+ "properties": {
3752
+ "id": {
3753
+ "type": "string",
3754
+ "description": "ID of the step."
3755
+ },
3756
+ "description": {
3757
+ "type": "string",
3758
+ "description": "Description of the step."
3759
+ },
3760
+ "action": {
3761
+ "type": "string",
3762
+ "const": "setVariables",
3763
+ "description": "Action to perform."
3764
+ },
3765
+ "path": {
3766
+ "type": "string",
3767
+ "description": "Path to the `.env` file."
3768
+ }
3769
+ },
3770
+ "dynamicDefaults": {
3771
+ "id": "uuid"
3772
+ },
3773
+ "required": [
3774
+ "action",
3775
+ "path"
3776
+ ],
3777
+ "additionalProperties": false,
3778
+ "examples": [
3779
+ {
3780
+ "action": "setVariables",
3781
+ "path": ".env"
3782
+ }
3783
+ ]
3784
+ },
3785
+ {
3786
+ "title": "typeKeys",
3787
+ "type": "object",
3788
+ "description": "Type keys. To type special keys, begin and end the string with `$` and use the [special key's enum](). For example, to type the Escape key, enter `$ESCAPE$`.",
3789
+ "properties": {
3790
+ "id": {
3791
+ "type": "string",
3792
+ "description": "ID of the step."
3793
+ },
3794
+ "description": {
3795
+ "type": "string",
3796
+ "description": "Description of the step."
3797
+ },
3798
+ "action": {
3799
+ "type": "string",
3800
+ "const": "typeKeys",
3801
+ "description": "The action to perform."
3802
+ },
3803
+ "keys": {
3804
+ "description": "String of keys to enter.",
3805
+ "anyOf": [
3806
+ {
3807
+ "type": "string"
3808
+ },
3809
+ {
3810
+ "type": "array",
3811
+ "items": {
3812
+ "oneOf": [
3813
+ {
3814
+ "type": "string"
3815
+ }
3816
+ ]
3817
+ }
3818
+ }
3819
+ ]
3820
+ }
3821
+ },
3822
+ "dynamicDefaults": {
3823
+ "id": "uuid"
3824
+ },
3825
+ "required": [
3826
+ "action",
3827
+ "keys"
3828
+ ],
3829
+ "additionalProperties": false,
3830
+ "examples": [
3831
+ {
3832
+ "action": "typeKeys",
3833
+ "keys": "kittens"
3834
+ },
3835
+ {
3836
+ "action": "typeKeys",
3837
+ "keys": [
3838
+ "$ENTER$"
3839
+ ]
3840
+ }
3841
+ ]
3842
+ },
3843
+ {
3844
+ "title": "find",
3845
+ "type": "object",
3846
+ "description": "Check if an element exists with the specified CSS selector.",
3847
+ "properties": {
3848
+ "id": {
3849
+ "type": "string",
3850
+ "description": "ID of the step."
3851
+ },
3852
+ "description": {
3853
+ "type": "string",
3854
+ "description": "Description of the step."
3855
+ },
3856
+ "action": {
3857
+ "type": "string",
3858
+ "const": "find",
3859
+ "description": "Action to perform."
3860
+ },
3861
+ "selector": {
3862
+ "description": "Selector that uniquely identifies the element.",
3863
+ "type": "string"
3864
+ },
3865
+ "timeout": {
3866
+ "type": "integer",
3867
+ "description": "Max duration in milliseconds to wait for the element to exist.",
3868
+ "default": 5000
3869
+ },
3870
+ "matchText": {
3871
+ "type": "string",
3872
+ "description": "Text that the element should contain. If the element doesn't contain the text, the step fails."
3873
+ },
3874
+ "moveTo": {
3875
+ "type": "boolean",
3876
+ "description": "Move to the element. If the element isn't visible, it's scrolled into view. Only runs the if the test is being recorded."
3877
+ },
3878
+ "click": {
3879
+ "type": "boolean",
3880
+ "description": "Click the element."
3881
+ },
3882
+ "typeKeys": {
3883
+ "description": "Type keys after finding the element. Either a string or an object with a `keys` field as defined in [`typeKeys`](/reference/schemas/typeKeys).<br><br>To type in the element, make the element active with the `click` parameter.",
3884
+ "oneOf": [
3885
+ {
3886
+ "type": "string"
3887
+ },
3888
+ {
3889
+ "type": "object",
3890
+ "additionalProperties": false,
3891
+ "properties": {
3892
+ "keys": {
3893
+ "description": "String of keys to enter.",
3894
+ "anyOf": [
3895
+ {
3896
+ "type": "string"
3897
+ },
3898
+ {
3899
+ "type": "array",
3900
+ "items": {
3901
+ "oneOf": [
3902
+ {
3903
+ "type": "string"
3904
+ }
3905
+ ]
3906
+ }
3907
+ }
3908
+ ]
3909
+ }
3910
+ }
3911
+ }
3912
+ ]
3913
+ }
3914
+ },
3915
+ "required": [
3916
+ "action",
3917
+ "selector"
3918
+ ],
3919
+ "dynamicDefaults": {
3920
+ "id": "uuid"
3921
+ },
3922
+ "additionalProperties": false,
3923
+ "examples": [
3924
+ {
3925
+ "action": "find",
3926
+ "selector": "[title=Search]"
3927
+ },
3928
+ {
3929
+ "action": "find",
3930
+ "selector": "[title=Search]",
3931
+ "timeout": 10000,
3932
+ "matchText": "Search",
3933
+ "moveTo": true,
3934
+ "click": true,
3935
+ "typeKeys": "shorthair cat"
3936
+ }
3937
+ ]
3938
+ },
3939
+ {
3940
+ "title": "wait",
3941
+ "type": "object",
3942
+ "description": "Pause before performing the next action.",
3943
+ "properties": {
3944
+ "id": {
3945
+ "type": "string",
3946
+ "description": "ID of the step."
3947
+ },
3948
+ "description": {
3949
+ "type": "string",
3950
+ "description": "Description of the step."
3951
+ },
3952
+ "action": {
3953
+ "type": "string",
3954
+ "const": "wait",
3955
+ "description": "The action to perform."
3956
+ },
3957
+ "duration": {
3958
+ "type": "number",
3959
+ "description": "Milliseconds to wait.",
3960
+ "default": 5000
3961
+ }
3962
+ },
3963
+ "dynamicDefaults": {
3964
+ "id": "uuid"
3965
+ },
3966
+ "required": [
3967
+ "action"
3968
+ ],
3969
+ "additionalProperties": false,
3970
+ "examples": [
3971
+ {
3972
+ "action": "wait"
3973
+ },
3974
+ {
3975
+ "action": "wait",
3976
+ "duration": 5000
3977
+ }
3978
+ ]
3979
+ }
3980
+ ]
3981
+ }
3982
+ }
3983
+ },
3984
+ "dynamicDefaults": {
3985
+ "id": "uuid"
3986
+ },
3987
+ "required": [
3988
+ "steps"
3989
+ ],
3990
+ "additionalProperties": false,
3991
+ "examples": [
3992
+ {
3993
+ "steps": [
3994
+ {
3995
+ "action": "checkLink",
3996
+ "url": "https://www.duckduckgo.com"
3997
+ }
3998
+ ]
3999
+ },
4000
+ {
4001
+ "steps": [
4002
+ {
4003
+ "action": "goTo",
4004
+ "url": "https://www.duckduckgo.com"
4005
+ },
4006
+ {
4007
+ "action": "find",
4008
+ "selector": "[title=Search]",
4009
+ "click": true,
4010
+ "typeKeys": {
4011
+ "keys": [
4012
+ "shorthair cats",
4013
+ "$ENTER$"
4014
+ ]
4015
+ }
4016
+ }
4017
+ ]
4018
+ },
4019
+ {
4020
+ "id": "Do all the things! - Test",
4021
+ "description": "This test includes every property across all actions.",
4022
+ "contexts": [
4023
+ {
4024
+ "app": {
4025
+ "name": "firefox",
4026
+ "path": "/usr/bin/firefox"
4027
+ },
4028
+ "platforms": [
4029
+ "linux"
4030
+ ]
4031
+ }
4032
+ ],
4033
+ "setup": "setup.json",
4034
+ "cleanup": "cleanup.json",
4035
+ "steps": [
4036
+ {
4037
+ "action": "setVariables",
4038
+ "path": ".env"
4039
+ },
4040
+ {
4041
+ "action": "runShell",
4042
+ "command": "echo",
4043
+ "args": [
4044
+ "$USER"
4045
+ ]
4046
+ },
4047
+ {
4048
+ "action": "checkLink",
4049
+ "url": "https://www.duckduckgo.com"
4050
+ },
4051
+ {
4052
+ "action": "httpRequest",
4053
+ "url": "https://reqres.in/api/users",
4054
+ "method": "post",
4055
+ "requestData": {
4056
+ "name": "morpheus",
4057
+ "job": "leader"
4058
+ },
4059
+ "responseData": {
4060
+ "name": "morpheus",
4061
+ "job": "leader"
4062
+ },
4063
+ "statusCodes": [
4064
+ 200,
4065
+ 201
4066
+ ]
4067
+ },
4068
+ {
4069
+ "action": "goTo",
4070
+ "url": "https://www.duckduckgo.com"
4071
+ },
4072
+ {
4073
+ "action": "find",
4074
+ "selector": "[title=Search]",
4075
+ "timeout": 10000,
4076
+ "matchText": "Search",
4077
+ "moveTo": true,
4078
+ "click": true,
4079
+ "typeKeys": {
4080
+ "keys": [
4081
+ "shorthair cat"
4082
+ ]
4083
+ }
4084
+ },
4085
+ {
4086
+ "action": "typeKeys",
4087
+ "keys": [
4088
+ "$ENTER$"
4089
+ ]
4090
+ },
4091
+ {
4092
+ "action": "saveScreenshot"
4093
+ }
4094
+ ]
4095
+ }
4096
+ ]
4097
+ },
4098
+ "typeKeys_v2": {
4099
+ "title": "typeKeys",
4100
+ "type": "object",
4101
+ "description": "Type keys. To type special keys, begin and end the string with `$` and use the [special key's enum](). For example, to type the Escape key, enter `$ESCAPE$`.",
4102
+ "properties": {
4103
+ "id": {
4104
+ "type": "string",
4105
+ "description": "ID of the step."
4106
+ },
4107
+ "description": {
4108
+ "type": "string",
4109
+ "description": "Description of the step."
4110
+ },
4111
+ "action": {
4112
+ "type": "string",
4113
+ "const": "typeKeys",
4114
+ "description": "The action to perform."
4115
+ },
4116
+ "keys": {
4117
+ "description": "String of keys to enter.",
4118
+ "anyOf": [
4119
+ {
4120
+ "type": "string"
4121
+ },
4122
+ {
4123
+ "type": "array",
4124
+ "items": {
4125
+ "oneOf": [
4126
+ {
4127
+ "type": "string"
4128
+ }
4129
+ ]
4130
+ }
4131
+ }
4132
+ ]
4133
+ }
4134
+ },
4135
+ "dynamicDefaults": {
4136
+ "id": "uuid"
4137
+ },
4138
+ "required": [
4139
+ "action",
4140
+ "keys"
4141
+ ],
4142
+ "additionalProperties": false,
4143
+ "examples": [
4144
+ {
4145
+ "action": "typeKeys",
4146
+ "keys": "kittens"
4147
+ },
4148
+ {
4149
+ "action": "typeKeys",
4150
+ "keys": [
4151
+ "$ENTER$"
4152
+ ]
4153
+ }
4154
+ ]
4155
+ },
4156
+ "wait_v2": {
4157
+ "title": "wait",
4158
+ "type": "object",
4159
+ "description": "Pause before performing the next action.",
4160
+ "properties": {
4161
+ "id": {
4162
+ "type": "string",
4163
+ "description": "ID of the step."
4164
+ },
4165
+ "description": {
4166
+ "type": "string",
4167
+ "description": "Description of the step."
4168
+ },
4169
+ "action": {
4170
+ "type": "string",
4171
+ "const": "wait",
4172
+ "description": "The action to perform."
4173
+ },
4174
+ "duration": {
4175
+ "type": "number",
4176
+ "description": "Milliseconds to wait.",
4177
+ "default": 5000
4178
+ }
4179
+ },
4180
+ "dynamicDefaults": {
4181
+ "id": "uuid"
4182
+ },
4183
+ "required": [
4184
+ "action"
4185
+ ],
4186
+ "additionalProperties": false,
4187
+ "examples": [
4188
+ {
4189
+ "action": "wait"
4190
+ },
4191
+ {
4192
+ "action": "wait",
4193
+ "duration": 5000
4194
+ }
4195
+ ]
4196
+ }
4197
+ }