doc-detective-common 4.0.0-beta.0-dev.4 → 4.0.0-beta.0-dev.5

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.
Files changed (200) hide show
  1. package/package.json +1 -1
  2. package/.c8rc.json +0 -8
  3. package/.mocharc.yml +0 -1
  4. package/icon.png +0 -0
  5. package/scripts/check-coverage-ratchet.cjs +0 -123
  6. package/scripts/createCjsWrapper.js +0 -25
  7. package/scripts/generateTypes.cjs +0 -54
  8. package/src/detectTests.ts +0 -660
  9. package/src/index.ts +0 -3
  10. package/src/schemas/build/checkLink_v2.schema.json +0 -81
  11. package/src/schemas/build/checkLink_v3.schema.json +0 -92
  12. package/src/schemas/build/click_v3.schema.json +0 -145
  13. package/src/schemas/build/config_v2.schema.json +0 -1079
  14. package/src/schemas/build/config_v3.schema.json +0 -696
  15. package/src/schemas/build/context_v2.schema.json +0 -135
  16. package/src/schemas/build/context_v3.schema.json +0 -229
  17. package/src/schemas/build/dragAndDrop_v3.schema.json +0 -189
  18. package/src/schemas/build/find_v2.schema.json +0 -168
  19. package/src/schemas/build/find_v3.schema.json +0 -214
  20. package/src/schemas/build/goTo_v2.schema.json +0 -63
  21. package/src/schemas/build/goTo_v3.schema.json +0 -257
  22. package/src/schemas/build/httpRequest_v2.schema.json +0 -321
  23. package/src/schemas/build/httpRequest_v3.schema.json +0 -439
  24. package/src/schemas/build/loadCookie_v3.schema.json +0 -138
  25. package/src/schemas/build/loadVariables_v3.schema.json +0 -10
  26. package/src/schemas/build/moveTo_v2.schema.json +0 -99
  27. package/src/schemas/build/openApi_v2.schema.json +0 -76
  28. package/src/schemas/build/openApi_v3.schema.json +0 -161
  29. package/src/schemas/build/record_v3.schema.json +0 -70
  30. package/src/schemas/build/report_v3.schema.json +0 -53
  31. package/src/schemas/build/resolvedTests_v3.schema.json +0 -238
  32. package/src/schemas/build/runCode_v2.schema.json +0 -201
  33. package/src/schemas/build/runCode_v3.schema.json +0 -138
  34. package/src/schemas/build/runShell_v2.schema.json +0 -189
  35. package/src/schemas/build/runShell_v3.schema.json +0 -156
  36. package/src/schemas/build/saveCookie_v3.schema.json +0 -149
  37. package/src/schemas/build/saveScreenshot_v2.schema.json +0 -150
  38. package/src/schemas/build/screenshot_v3.schema.json +0 -250
  39. package/src/schemas/build/setVariables_v2.schema.json +0 -39
  40. package/src/schemas/build/sourceIntegration_v3.schema.json +0 -51
  41. package/src/schemas/build/spec_v2.schema.json +0 -199
  42. package/src/schemas/build/spec_v3.schema.json +0 -213
  43. package/src/schemas/build/startRecording_v2.schema.json +0 -57
  44. package/src/schemas/build/step_v3.schema.json +0 -669
  45. package/src/schemas/build/stopRecord_v3.schema.json +0 -13
  46. package/src/schemas/build/stopRecording_v2.schema.json +0 -33
  47. package/src/schemas/build/test_v2.schema.json +0 -244
  48. package/src/schemas/build/test_v3.schema.json +0 -292
  49. package/src/schemas/build/typeKeys_v2.schema.json +0 -72
  50. package/src/schemas/build/type_v3.schema.json +0 -131
  51. package/src/schemas/build/wait_v2.schema.json +0 -42
  52. package/src/schemas/build/wait_v3.schema.json +0 -37
  53. package/src/schemas/dereferenceSchemas.cjs +0 -208
  54. package/src/schemas/index.ts +0 -6
  55. package/src/schemas/output_schemas/analytics_v1.schema.json +0 -585
  56. package/src/schemas/output_schemas/checkLink_v1.schema.json +0 -42
  57. package/src/schemas/output_schemas/checkLink_v2.schema.json +0 -80
  58. package/src/schemas/output_schemas/checkLink_v3.schema.json +0 -145
  59. package/src/schemas/output_schemas/click_v1.schema.json +0 -60
  60. package/src/schemas/output_schemas/click_v3.schema.json +0 -252
  61. package/src/schemas/output_schemas/config_v2.schema.json +0 -2628
  62. package/src/schemas/output_schemas/config_v3.schema.json +0 -16470
  63. package/src/schemas/output_schemas/context_v2.schema.json +0 -134
  64. package/src/schemas/output_schemas/context_v3.schema.json +0 -374
  65. package/src/schemas/output_schemas/dragAndDrop_v3.schema.json +0 -496
  66. package/src/schemas/output_schemas/endRecord_v3.schema.json +0 -12
  67. package/src/schemas/output_schemas/find_v1.schema.json +0 -171
  68. package/src/schemas/output_schemas/find_v2.schema.json +0 -184
  69. package/src/schemas/output_schemas/find_v3.schema.json +0 -1349
  70. package/src/schemas/output_schemas/goTo_v1.schema.json +0 -30
  71. package/src/schemas/output_schemas/goTo_v2.schema.json +0 -62
  72. package/src/schemas/output_schemas/goTo_v3.schema.json +0 -419
  73. package/src/schemas/output_schemas/httpRequest_v1.schema.json +0 -115
  74. package/src/schemas/output_schemas/httpRequest_v2.schema.json +0 -392
  75. package/src/schemas/output_schemas/httpRequest_v3.schema.json +0 -994
  76. package/src/schemas/output_schemas/loadCookie_v3.schema.json +0 -228
  77. package/src/schemas/output_schemas/loadVariables_v3.schema.json +0 -9
  78. package/src/schemas/output_schemas/matchText_v1.schema.json +0 -32
  79. package/src/schemas/output_schemas/moveMouse_v1.schema.json +0 -60
  80. package/src/schemas/output_schemas/moveTo_v2.schema.json +0 -98
  81. package/src/schemas/output_schemas/openApi_v2.schema.json +0 -75
  82. package/src/schemas/output_schemas/openApi_v3.schema.json +0 -162
  83. package/src/schemas/output_schemas/record_v3.schema.json +0 -101
  84. package/src/schemas/output_schemas/report_v3.schema.json +0 -16826
  85. package/src/schemas/output_schemas/resolvedTests_v3.schema.json +0 -33331
  86. package/src/schemas/output_schemas/runCode_v2.schema.json +0 -200
  87. package/src/schemas/output_schemas/runCode_v3.schema.json +0 -222
  88. package/src/schemas/output_schemas/runShell_v1.schema.json +0 -35
  89. package/src/schemas/output_schemas/runShell_v2.schema.json +0 -188
  90. package/src/schemas/output_schemas/runShell_v3.schema.json +0 -236
  91. package/src/schemas/output_schemas/saveCookie_v3.schema.json +0 -245
  92. package/src/schemas/output_schemas/saveScreenshot_v2.schema.json +0 -149
  93. package/src/schemas/output_schemas/screenshot_v1.schema.json +0 -48
  94. package/src/schemas/output_schemas/screenshot_v3.schema.json +0 -681
  95. package/src/schemas/output_schemas/scroll_v1.schema.json +0 -50
  96. package/src/schemas/output_schemas/setVariables_v2.schema.json +0 -38
  97. package/src/schemas/output_schemas/sourceIntegration_v3.schema.json +0 -50
  98. package/src/schemas/output_schemas/spec_v2.schema.json +0 -2301
  99. package/src/schemas/output_schemas/spec_v3.schema.json +0 -16630
  100. package/src/schemas/output_schemas/startRecording_v1.schema.json +0 -55
  101. package/src/schemas/output_schemas/startRecording_v2.schema.json +0 -56
  102. package/src/schemas/output_schemas/step_v3.schema.json +0 -7317
  103. package/src/schemas/output_schemas/stopRecord_v3.schema.json +0 -12
  104. package/src/schemas/output_schemas/stopRecording_v1.schema.json +0 -20
  105. package/src/schemas/output_schemas/stopRecording_v2.schema.json +0 -32
  106. package/src/schemas/output_schemas/test_v2.schema.json +0 -1903
  107. package/src/schemas/output_schemas/test_v3.schema.json +0 -15863
  108. package/src/schemas/output_schemas/typeKeys_v2.schema.json +0 -71
  109. package/src/schemas/output_schemas/type_v1.schema.json +0 -62
  110. package/src/schemas/output_schemas/type_v3.schema.json +0 -244
  111. package/src/schemas/output_schemas/wait_v1.schema.json +0 -42
  112. package/src/schemas/output_schemas/wait_v2.schema.json +0 -41
  113. package/src/schemas/output_schemas/wait_v3.schema.json +0 -41
  114. package/src/schemas/schemas.json +0 -121331
  115. package/src/schemas/src_schemas/analytics_v1.schema.json +0 -585
  116. package/src/schemas/src_schemas/checkLink_v1.schema.json +0 -42
  117. package/src/schemas/src_schemas/checkLink_v2.schema.json +0 -65
  118. package/src/schemas/src_schemas/checkLink_v3.schema.json +0 -91
  119. package/src/schemas/src_schemas/click_v1.schema.json +0 -60
  120. package/src/schemas/src_schemas/click_v3.schema.json +0 -144
  121. package/src/schemas/src_schemas/config_v2.schema.json +0 -929
  122. package/src/schemas/src_schemas/config_v3.schema.json +0 -633
  123. package/src/schemas/src_schemas/context_v2.schema.json +0 -108
  124. package/src/schemas/src_schemas/context_v3.schema.json +0 -202
  125. package/src/schemas/src_schemas/dragAndDrop_v3.schema.json +0 -185
  126. package/src/schemas/src_schemas/find_v1.schema.json +0 -137
  127. package/src/schemas/src_schemas/find_v2.schema.json +0 -155
  128. package/src/schemas/src_schemas/find_v3.schema.json +0 -210
  129. package/src/schemas/src_schemas/goTo_v1.schema.json +0 -30
  130. package/src/schemas/src_schemas/goTo_v2.schema.json +0 -58
  131. package/src/schemas/src_schemas/goTo_v3.schema.json +0 -232
  132. package/src/schemas/src_schemas/httpRequest_v1.schema.json +0 -115
  133. package/src/schemas/src_schemas/httpRequest_v2.schema.json +0 -284
  134. package/src/schemas/src_schemas/httpRequest_v3.schema.json +0 -402
  135. package/src/schemas/src_schemas/loadCookie_v3.schema.json +0 -113
  136. package/src/schemas/src_schemas/loadVariables_v3.schema.json +0 -9
  137. package/src/schemas/src_schemas/matchText_v1.schema.json +0 -32
  138. package/src/schemas/src_schemas/moveMouse_v1.schema.json +0 -60
  139. package/src/schemas/src_schemas/moveTo_v2.schema.json +0 -89
  140. package/src/schemas/src_schemas/openApi_v2.schema.json +0 -64
  141. package/src/schemas/src_schemas/openApi_v3.schema.json +0 -161
  142. package/src/schemas/src_schemas/record_v3.schema.json +0 -69
  143. package/src/schemas/src_schemas/report_v3.schema.json +0 -52
  144. package/src/schemas/src_schemas/resolvedTests_v3.schema.json +0 -237
  145. package/src/schemas/src_schemas/runCode_v2.schema.json +0 -181
  146. package/src/schemas/src_schemas/runCode_v3.schema.json +0 -137
  147. package/src/schemas/src_schemas/runShell_v1.schema.json +0 -35
  148. package/src/schemas/src_schemas/runShell_v2.schema.json +0 -166
  149. package/src/schemas/src_schemas/runShell_v3.schema.json +0 -155
  150. package/src/schemas/src_schemas/saveCookie_v3.schema.json +0 -124
  151. package/src/schemas/src_schemas/saveScreenshot_v2.schema.json +0 -129
  152. package/src/schemas/src_schemas/screenshot_v1.schema.json +0 -48
  153. package/src/schemas/src_schemas/screenshot_v3.schema.json +0 -249
  154. package/src/schemas/src_schemas/scroll_v1.schema.json +0 -50
  155. package/src/schemas/src_schemas/setVariables_v2.schema.json +0 -38
  156. package/src/schemas/src_schemas/sourceIntegration_v3.schema.json +0 -45
  157. package/src/schemas/src_schemas/spec_v2.schema.json +0 -175
  158. package/src/schemas/src_schemas/spec_v3.schema.json +0 -212
  159. package/src/schemas/src_schemas/startRecording_v1.schema.json +0 -55
  160. package/src/schemas/src_schemas/startRecording_v2.schema.json +0 -54
  161. package/src/schemas/src_schemas/step_v3.schema.json +0 -632
  162. package/src/schemas/src_schemas/stopRecord_v3.schema.json +0 -9
  163. package/src/schemas/src_schemas/stopRecording_v1.schema.json +0 -20
  164. package/src/schemas/src_schemas/stopRecording_v2.schema.json +0 -32
  165. package/src/schemas/src_schemas/test_v2.schema.json +0 -200
  166. package/src/schemas/src_schemas/test_v3.schema.json +0 -268
  167. package/src/schemas/src_schemas/typeKeys_v2.schema.json +0 -63
  168. package/src/schemas/src_schemas/type_v1.schema.json +0 -62
  169. package/src/schemas/src_schemas/type_v3.schema.json +0 -118
  170. package/src/schemas/src_schemas/wait_v1.schema.json +0 -42
  171. package/src/schemas/src_schemas/wait_v2.schema.json +0 -41
  172. package/src/schemas/src_schemas/wait_v3.schema.json +0 -36
  173. package/src/types/generated/checkLink_v3.ts +0 -29
  174. package/src/types/generated/click_v3.ts +0 -17
  175. package/src/types/generated/config_v3.ts +0 -405
  176. package/src/types/generated/context_v3.ts +0 -112
  177. package/src/types/generated/dragAndDrop_v3.ts +0 -39
  178. package/src/types/generated/endRecord_v3.ts +0 -10
  179. package/src/types/generated/find_v3.ts +0 -17
  180. package/src/types/generated/goTo_v3.ts +0 -48
  181. package/src/types/generated/httpRequest_v3.ts +0 -17
  182. package/src/types/generated/loadCookie_v3.ts +0 -17
  183. package/src/types/generated/loadVariables_v3.ts +0 -10
  184. package/src/types/generated/openApi_v3.ts +0 -64
  185. package/src/types/generated/record_v3.ts +0 -34
  186. package/src/types/generated/report_v3.ts +0 -183
  187. package/src/types/generated/resolvedTests_v3.ts +0 -585
  188. package/src/types/generated/runCode_v3.ts +0 -59
  189. package/src/types/generated/runShell_v3.ts +0 -58
  190. package/src/types/generated/saveCookie_v3.ts +0 -17
  191. package/src/types/generated/screenshot_v3.ts +0 -76
  192. package/src/types/generated/sourceIntegration_v3.ts +0 -31
  193. package/src/types/generated/spec_v3.ts +0 -166
  194. package/src/types/generated/step_v3.ts +0 -1288
  195. package/src/types/generated/stopRecord_v3.ts +0 -10
  196. package/src/types/generated/test_v3.ts +0 -3048
  197. package/src/types/generated/type_v3.ts +0 -56
  198. package/src/types/generated/wait_v3.ts +0 -13
  199. package/src/validate.ts +0 -627
  200. package/tsconfig.json +0 -22
@@ -1,2301 +0,0 @@
1
- {
2
- "title": "specification",
3
- "type": "object",
4
- "properties": {
5
- "id": {
6
- "type": "string",
7
- "description": "Unique identifier for the test specification."
8
- },
9
- "description": {
10
- "type": "string",
11
- "description": "Description of the test specification."
12
- },
13
- "file": {
14
- "type": "string",
15
- "description": "Path to the file that the specification is associated with."
16
- },
17
- "contexts": {
18
- "type": "array",
19
- "description": "Application/platform sets to run tests in. Overrides `contexts` defined at the config-level.",
20
- "items": {
21
- "oneOf": [
22
- {
23
- "title": "context",
24
- "type": "object",
25
- "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.",
26
- "properties": {
27
- "app": {
28
- "type": "object",
29
- "description": "The application to run.",
30
- "additionalProperties": false,
31
- "required": [
32
- "name"
33
- ],
34
- "properties": {
35
- "name": {
36
- "type": "string",
37
- "description": "Name of the application.",
38
- "enum": [
39
- "chrome",
40
- "firefox",
41
- "safari",
42
- "edge"
43
- ]
44
- },
45
- "path": {
46
- "type": "string",
47
- "description": "Absolute path or command for the application. If not specified, defaults to typical install paths per platform. If specified but the path is invalid, the context is skipped."
48
- },
49
- "options": {
50
- "type": "object",
51
- "description": "Options to pass to the app. Only works when `name` is `firefox` or `chrome`.",
52
- "additionalProperties": false,
53
- "properties": {
54
- "width": {
55
- "type": "integer",
56
- "description": "Width of the window in pixels."
57
- },
58
- "height": {
59
- "type": "integer",
60
- "description": "Height of the window in pixels."
61
- },
62
- "viewport_height": {
63
- "type": "integer",
64
- "description": "Height of the viewport in pixels. Overrides `height`."
65
- },
66
- "viewport_width": {
67
- "type": "integer",
68
- "description": "Width of the viewport in pixels. Overrides `width`."
69
- },
70
- "headless": {
71
- "type": "boolean",
72
- "description": "If `true`, runs the browser in headless mode. Not supported by Safari."
73
- },
74
- "driverPath": {
75
- "type": "string",
76
- "description": "Path to the browser driver. If not specified, defaults to internally managed dependencies."
77
- }
78
- }
79
- }
80
- }
81
- },
82
- "platforms": {
83
- "description": "Supported platforms for the application.",
84
- "type": "array",
85
- "items": {
86
- "type": "string",
87
- "enum": [
88
- "linux",
89
- "mac",
90
- "windows"
91
- ]
92
- }
93
- }
94
- },
95
- "required": [
96
- "app",
97
- "platforms"
98
- ],
99
- "additionalProperties": false,
100
- "examples": [
101
- {
102
- "app": {
103
- "name": "chrome"
104
- },
105
- "platforms": [
106
- "linux"
107
- ]
108
- },
109
- {
110
- "app": {
111
- "name": "chrome",
112
- "options": {
113
- "viewport_width": 800,
114
- "viewport_height": 600
115
- }
116
- },
117
- "platforms": [
118
- "linux"
119
- ]
120
- },
121
- {
122
- "app": {
123
- "name": "firefox",
124
- "options": {
125
- "width": 800,
126
- "height": 600,
127
- "headless": false,
128
- "driverPath": "/usr/bin/geckodriver"
129
- }
130
- },
131
- "platforms": [
132
- "linux",
133
- "windows",
134
- "mac"
135
- ]
136
- },
137
- {
138
- "app": {
139
- "name": "safari"
140
- },
141
- "platforms": [
142
- "mac"
143
- ]
144
- },
145
- {
146
- "app": {
147
- "name": "firefox",
148
- "path": "/usr/bin/firefox"
149
- },
150
- "platforms": [
151
- "linux"
152
- ]
153
- }
154
- ]
155
- }
156
- ]
157
- }
158
- },
159
- "openApi": {
160
- "type": "array",
161
- "items": {
162
- "allOf": [
163
- {
164
- "version": "1.0.0",
165
- "$schema": "http://json-schema.org/draft-07/schema#",
166
- "title": "openApi",
167
- "type": "object",
168
- "description": "OpenAPI definition and configuration.",
169
- "additionalProperties": false,
170
- "properties": {
171
- "name": {
172
- "type": "string",
173
- "description": "Name of the OpenAPI definition, as defined in your configuration."
174
- },
175
- "descriptionPath": {
176
- "type": "string",
177
- "description": "URL or local path to the OpenAPI definition."
178
- },
179
- "operationId": {
180
- "type": "string",
181
- "description": "ID of the operation to use for the request."
182
- },
183
- "server": {
184
- "type": "string",
185
- "description": "Server to use for example requests. Only valid if `useExample` is `request` or `both`. If not specified but an example is used for the request, uses the first server defined in the OpenAPI definition."
186
- },
187
- "validateAgainstSchema": {
188
- "type": "string",
189
- "description": "Validates the request and/or response against the schema in the OpenAPI definition. If the request or response doesn't match the schema, the step fails.",
190
- "enum": [
191
- "request",
192
- "response",
193
- "both",
194
- "none"
195
- ],
196
- "default": "both"
197
- },
198
- "mockResponse": {
199
- "type": "boolean",
200
- "description": "If `true`, doesn't make the HTTP request, but instead uses the response example or schema from the OpenAPI definition as the response data. Useful for creating tests when an API isn't fully implemented yet. If `statusCode` isn't specified, uses the first defined response code."
201
- },
202
- "statusCode": {
203
- "type": "integer",
204
- "description": "Response code to use for validation, examples, and status code checking. If the response code doesn't match, the step fails. `statusCodes` overrides this value when specified."
205
- },
206
- "useExample": {
207
- "type": [
208
- "string"
209
- ],
210
- "description": "Uses the example from the OpenAPI definition as the request and response data. If the request or response has multiple examples, specify `exampleKey`. If `statusCode` isn't specified, uses the first defined response code. `requestData`, `requestParams`, and `requestHeaders` override portions of request examples when specified. `responseData` overrides portions of response examples when specified.",
211
- "enum": [
212
- "request",
213
- "response",
214
- "both",
215
- "none"
216
- ],
217
- "default": "none"
218
- },
219
- "exampleKey": {
220
- "type": "string",
221
- "description": "Key of the example to use from the `examples` property in the OpenAPI definition. If an `examples` key isn't specified or isn't available for a given parameter or object, the `example` property value is used.",
222
- "default": ""
223
- },
224
- "requestHeaders": {
225
- "type": "object",
226
- "description": "Request headers to add to the request. If specified in both a config and a step, the step value overrides the config value.",
227
- "additionalProperties": {
228
- "type": "string"
229
- }
230
- }
231
- },
232
- "examples": [
233
- {
234
- "descriptionPath": "https://petstore.swagger.io/v2/swagger.json"
235
- }
236
- ]
237
- },
238
- {
239
- "type": "object",
240
- "properties": {
241
- "operationId": {
242
- "type": "null",
243
- "$commment": "Only allow operationId at the step level."
244
- }
245
- },
246
- "required": [
247
- "name",
248
- "descriptionPath"
249
- ]
250
- }
251
- ]
252
- }
253
- },
254
- "tests": {
255
- "description": "[Tests](test) to perform.",
256
- "type": "array",
257
- "minItems": 1,
258
- "items": {
259
- "oneOf": [
260
- {
261
- "title": "test",
262
- "type": "object",
263
- "description": "A Doc Detective test.",
264
- "properties": {
265
- "id": {
266
- "type": "string",
267
- "description": "Unique identifier for the test."
268
- },
269
- "description": {
270
- "type": "string",
271
- "description": "Description of the test."
272
- },
273
- "file": {
274
- "type": "string",
275
- "description": "Path to the file that the test is associated with."
276
- },
277
- "detectSteps": {
278
- "type": "boolean",
279
- "description": "Whether or not to detect steps in input files based on markup regex. Defaults to `true`."
280
- },
281
- "contexts": {
282
- "type": "array",
283
- "description": "Application/platform sets to run the test in. Overrides `contexts` defined at the config-level and spec-level.",
284
- "items": {
285
- "oneOf": [
286
- {
287
- "title": "context",
288
- "type": "object",
289
- "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.",
290
- "properties": {
291
- "app": {
292
- "type": "object",
293
- "description": "The application to run.",
294
- "additionalProperties": false,
295
- "required": [
296
- "name"
297
- ],
298
- "properties": {
299
- "name": {
300
- "type": "string",
301
- "description": "Name of the application.",
302
- "enum": [
303
- "chrome",
304
- "firefox",
305
- "safari",
306
- "edge"
307
- ]
308
- },
309
- "path": {
310
- "type": "string",
311
- "description": "Absolute path or command for the application. If not specified, defaults to typical install paths per platform. If specified but the path is invalid, the context is skipped."
312
- },
313
- "options": {
314
- "type": "object",
315
- "description": "Options to pass to the app. Only works when `name` is `firefox` or `chrome`.",
316
- "additionalProperties": false,
317
- "properties": {
318
- "width": {
319
- "type": "integer",
320
- "description": "Width of the window in pixels."
321
- },
322
- "height": {
323
- "type": "integer",
324
- "description": "Height of the window in pixels."
325
- },
326
- "viewport_height": {
327
- "type": "integer",
328
- "description": "Height of the viewport in pixels. Overrides `height`."
329
- },
330
- "viewport_width": {
331
- "type": "integer",
332
- "description": "Width of the viewport in pixels. Overrides `width`."
333
- },
334
- "headless": {
335
- "type": "boolean",
336
- "description": "If `true`, runs the browser in headless mode. Not supported by Safari."
337
- },
338
- "driverPath": {
339
- "type": "string",
340
- "description": "Path to the browser driver. If not specified, defaults to internally managed dependencies."
341
- }
342
- }
343
- }
344
- }
345
- },
346
- "platforms": {
347
- "description": "Supported platforms for the application.",
348
- "type": "array",
349
- "items": {
350
- "type": "string",
351
- "enum": [
352
- "linux",
353
- "mac",
354
- "windows"
355
- ]
356
- }
357
- }
358
- },
359
- "required": [
360
- "app",
361
- "platforms"
362
- ],
363
- "additionalProperties": false,
364
- "examples": [
365
- {
366
- "app": {
367
- "name": "chrome"
368
- },
369
- "platforms": [
370
- "linux"
371
- ]
372
- },
373
- {
374
- "app": {
375
- "name": "chrome",
376
- "options": {
377
- "viewport_width": 800,
378
- "viewport_height": 600
379
- }
380
- },
381
- "platforms": [
382
- "linux"
383
- ]
384
- },
385
- {
386
- "app": {
387
- "name": "firefox",
388
- "options": {
389
- "width": 800,
390
- "height": 600,
391
- "headless": false,
392
- "driverPath": "/usr/bin/geckodriver"
393
- }
394
- },
395
- "platforms": [
396
- "linux",
397
- "windows",
398
- "mac"
399
- ]
400
- },
401
- {
402
- "app": {
403
- "name": "safari"
404
- },
405
- "platforms": [
406
- "mac"
407
- ]
408
- },
409
- {
410
- "app": {
411
- "name": "firefox",
412
- "path": "/usr/bin/firefox"
413
- },
414
- "platforms": [
415
- "linux"
416
- ]
417
- }
418
- ]
419
- }
420
- ]
421
- }
422
- },
423
- "openApi": {
424
- "type": "array",
425
- "items": {
426
- "allOf": [
427
- {
428
- "version": "1.0.0",
429
- "$schema": "http://json-schema.org/draft-07/schema#",
430
- "title": "openApi",
431
- "type": "object",
432
- "description": "OpenAPI definition and configuration.",
433
- "additionalProperties": false,
434
- "properties": {
435
- "name": {
436
- "type": "string",
437
- "description": "Name of the OpenAPI definition, as defined in your configuration."
438
- },
439
- "descriptionPath": {
440
- "type": "string",
441
- "description": "URL or local path to the OpenAPI definition."
442
- },
443
- "operationId": {
444
- "type": "string",
445
- "description": "ID of the operation to use for the request."
446
- },
447
- "server": {
448
- "type": "string",
449
- "description": "Server to use for example requests. Only valid if `useExample` is `request` or `both`. If not specified but an example is used for the request, uses the first server defined in the OpenAPI definition."
450
- },
451
- "validateAgainstSchema": {
452
- "type": "string",
453
- "description": "Validates the request and/or response against the schema in the OpenAPI definition. If the request or response doesn't match the schema, the step fails.",
454
- "enum": [
455
- "request",
456
- "response",
457
- "both",
458
- "none"
459
- ],
460
- "default": "both"
461
- },
462
- "mockResponse": {
463
- "type": "boolean",
464
- "description": "If `true`, doesn't make the HTTP request, but instead uses the response example or schema from the OpenAPI definition as the response data. Useful for creating tests when an API isn't fully implemented yet. If `statusCode` isn't specified, uses the first defined response code."
465
- },
466
- "statusCode": {
467
- "type": "integer",
468
- "description": "Response code to use for validation, examples, and status code checking. If the response code doesn't match, the step fails. `statusCodes` overrides this value when specified."
469
- },
470
- "useExample": {
471
- "type": [
472
- "string"
473
- ],
474
- "description": "Uses the example from the OpenAPI definition as the request and response data. If the request or response has multiple examples, specify `exampleKey`. If `statusCode` isn't specified, uses the first defined response code. `requestData`, `requestParams`, and `requestHeaders` override portions of request examples when specified. `responseData` overrides portions of response examples when specified.",
475
- "enum": [
476
- "request",
477
- "response",
478
- "both",
479
- "none"
480
- ],
481
- "default": "none"
482
- },
483
- "exampleKey": {
484
- "type": "string",
485
- "description": "Key of the example to use from the `examples` property in the OpenAPI definition. If an `examples` key isn't specified or isn't available for a given parameter or object, the `example` property value is used.",
486
- "default": ""
487
- },
488
- "requestHeaders": {
489
- "type": "object",
490
- "description": "Request headers to add to the request. If specified in both a config and a step, the step value overrides the config value.",
491
- "additionalProperties": {
492
- "type": "string"
493
- }
494
- }
495
- },
496
- "examples": [
497
- {
498
- "descriptionPath": "https://petstore.swagger.io/v2/swagger.json"
499
- }
500
- ]
501
- },
502
- {
503
- "type": "object",
504
- "properties": {
505
- "operationId": {
506
- "type": "null",
507
- "$commment": "Only allow operationId at the step level."
508
- }
509
- },
510
- "required": [
511
- "name",
512
- "descriptionPath"
513
- ]
514
- }
515
- ]
516
- }
517
- },
518
- "setup": {
519
- "type": "string",
520
- "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."
521
- },
522
- "cleanup": {
523
- "type": "string",
524
- "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."
525
- },
526
- "steps": {
527
- "description": "Actions to perform as part of the test. Performed in the sequence defined. If one or more actions fail, the test fails.",
528
- "type": "array",
529
- "minItems": 1,
530
- "items": {
531
- "anyOf": [
532
- {
533
- "title": "checkLink",
534
- "type": "object",
535
- "description": "Check if a URL returns an acceptable status code from a GET request.",
536
- "properties": {
537
- "id": {
538
- "type": "string",
539
- "description": "ID of the step."
540
- },
541
- "description": {
542
- "type": "string",
543
- "description": "Description of the step."
544
- },
545
- "action": {
546
- "type": "string",
547
- "const": "checkLink",
548
- "description": "Action to perform."
549
- },
550
- "url": {
551
- "type": "string",
552
- "description": "URL to check.",
553
- "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
554
- "transform": [
555
- "trim"
556
- ]
557
- },
558
- "origin": {
559
- "type": "string",
560
- "description": "Protocol and domain to navigate to. Prepended to `url`.",
561
- "transform": [
562
- "trim"
563
- ]
564
- },
565
- "statusCodes": {
566
- "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
567
- "type": "array",
568
- "items": {
569
- "oneOf": [
570
- {
571
- "type": "integer"
572
- }
573
- ]
574
- },
575
- "default": [
576
- 200,
577
- 201,
578
- 202
579
- ]
580
- }
581
- },
582
- "dynamicDefaults": {
583
- "id": "uuid"
584
- },
585
- "required": [
586
- "action",
587
- "url"
588
- ],
589
- "additionalProperties": false,
590
- "examples": [
591
- {
592
- "action": "checkLink",
593
- "url": "https://www.google.com"
594
- },
595
- {
596
- "action": "checkLink",
597
- "url": "https://www.google.com",
598
- "statusCodes": [
599
- 200
600
- ]
601
- },
602
- {
603
- "action": "checkLink",
604
- "url": "/search",
605
- "origin": "www.google.com",
606
- "statusCodes": [
607
- 200
608
- ]
609
- }
610
- ]
611
- },
612
- {
613
- "title": "goTo",
614
- "type": "object",
615
- "description": "Navigate to a specified URL.",
616
- "properties": {
617
- "id": {
618
- "type": "string",
619
- "description": "ID of the step."
620
- },
621
- "description": {
622
- "type": "string",
623
- "description": "Description of the step."
624
- },
625
- "action": {
626
- "type": "string",
627
- "const": "goTo",
628
- "description": "Action to perform."
629
- },
630
- "url": {
631
- "type": "string",
632
- "description": "URL to navigate to.",
633
- "pattern": "(^(http://|https://|/).*|\\$[A-Za-z0-9_]+)",
634
- "transform": [
635
- "trim"
636
- ]
637
- },
638
- "origin": {
639
- "type": "string",
640
- "description": "Protocol and domain to navigate to. Prepended to `url`.",
641
- "transform": [
642
- "trim"
643
- ]
644
- }
645
- },
646
- "dynamicDefaults": {
647
- "id": "uuid"
648
- },
649
- "required": [
650
- "action",
651
- "url"
652
- ],
653
- "additionalProperties": false,
654
- "examples": [
655
- {
656
- "action": "goTo",
657
- "url": "https://www.google.com"
658
- },
659
- {
660
- "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
661
- "description": "This is a test!",
662
- "action": "goTo",
663
- "url": "https://www.google.com"
664
- },
665
- {
666
- "id": "ddec5e20-2e81-4f38-867c-92c8d9516756",
667
- "description": "This is a test!",
668
- "action": "goTo",
669
- "url": "/search",
670
- "origin": "https://www.google.com"
671
- }
672
- ]
673
- },
674
- {
675
- "title": "httpRequest",
676
- "type": "object",
677
- "description": "Perform a generic HTTP request, for example to an API.",
678
- "properties": {
679
- "id": {
680
- "type": "string",
681
- "description": "ID of the step."
682
- },
683
- "description": {
684
- "type": "string",
685
- "description": "Description of the step."
686
- },
687
- "action": {
688
- "type": "string",
689
- "const": "httpRequest",
690
- "description": "Action to perform."
691
- },
692
- "url": {
693
- "type": "string",
694
- "description": "URL for the HTTP request.",
695
- "pattern": "(^(http://|https://).*|\\$[A-Za-z0-9_]+)",
696
- "transform": [
697
- "trim"
698
- ]
699
- },
700
- "openApi": {
701
- "allOf": [
702
- {
703
- "version": "1.0.0",
704
- "$schema": "http://json-schema.org/draft-07/schema#",
705
- "title": "openApi",
706
- "type": "object",
707
- "description": "OpenAPI definition and configuration.",
708
- "additionalProperties": false,
709
- "properties": {
710
- "name": {
711
- "type": "string",
712
- "description": "Name of the OpenAPI definition, as defined in your configuration."
713
- },
714
- "descriptionPath": {
715
- "type": "string",
716
- "description": "URL or local path to the OpenAPI definition."
717
- },
718
- "operationId": {
719
- "type": "string",
720
- "description": "ID of the operation to use for the request."
721
- },
722
- "server": {
723
- "type": "string",
724
- "description": "Server to use for example requests. Only valid if `useExample` is `request` or `both`. If not specified but an example is used for the request, uses the first server defined in the OpenAPI definition."
725
- },
726
- "validateAgainstSchema": {
727
- "type": "string",
728
- "description": "Validates the request and/or response against the schema in the OpenAPI definition. If the request or response doesn't match the schema, the step fails.",
729
- "enum": [
730
- "request",
731
- "response",
732
- "both",
733
- "none"
734
- ],
735
- "default": "both"
736
- },
737
- "mockResponse": {
738
- "type": "boolean",
739
- "description": "If `true`, doesn't make the HTTP request, but instead uses the response example or schema from the OpenAPI definition as the response data. Useful for creating tests when an API isn't fully implemented yet. If `statusCode` isn't specified, uses the first defined response code."
740
- },
741
- "statusCode": {
742
- "type": "integer",
743
- "description": "Response code to use for validation, examples, and status code checking. If the response code doesn't match, the step fails. `statusCodes` overrides this value when specified."
744
- },
745
- "useExample": {
746
- "type": [
747
- "string"
748
- ],
749
- "description": "Uses the example from the OpenAPI definition as the request and response data. If the request or response has multiple examples, specify `exampleKey`. If `statusCode` isn't specified, uses the first defined response code. `requestData`, `requestParams`, and `requestHeaders` override portions of request examples when specified. `responseData` overrides portions of response examples when specified.",
750
- "enum": [
751
- "request",
752
- "response",
753
- "both",
754
- "none"
755
- ],
756
- "default": "none"
757
- },
758
- "exampleKey": {
759
- "type": "string",
760
- "description": "Key of the example to use from the `examples` property in the OpenAPI definition. If an `examples` key isn't specified or isn't available for a given parameter or object, the `example` property value is used.",
761
- "default": ""
762
- },
763
- "requestHeaders": {
764
- "type": "object",
765
- "description": "Request headers to add to the request. If specified in both a config and a step, the step value overrides the config value.",
766
- "additionalProperties": {
767
- "type": "string"
768
- }
769
- }
770
- },
771
- "examples": [
772
- {
773
- "descriptionPath": "https://petstore.swagger.io/v2/swagger.json"
774
- }
775
- ]
776
- },
777
- {
778
- "type": "object",
779
- "required": [
780
- "operationId"
781
- ]
782
- }
783
- ]
784
- },
785
- "statusCodes": {
786
- "description": "Accepted status codes. If the specified URL returns a code other than what is specified here, the action fails.",
787
- "type": "array",
788
- "items": {
789
- "oneOf": [
790
- {
791
- "type": "integer"
792
- }
793
- ]
794
- },
795
- "default": [
796
- 200
797
- ]
798
- },
799
- "method": {
800
- "type": "string",
801
- "description": "Method of the HTTP request",
802
- "enum": [
803
- "get",
804
- "put",
805
- "post",
806
- "patch",
807
- "delete"
808
- ],
809
- "transform": [
810
- "trim",
811
- "toEnumCase"
812
- ],
813
- "default": "get"
814
- },
815
- "timeout": {
816
- "type": "integer",
817
- "description": "Timeout for the HTTP request, in milliseconds.",
818
- "default": 60000
819
- },
820
- "requestHeaders": {
821
- "description": "Headers to include in the HTTP request, in key/value format.",
822
- "type": "object",
823
- "additionalProperties": true,
824
- "properties": {},
825
- "default": {}
826
- },
827
- "responseHeaders": {
828
- "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.",
829
- "type": "object",
830
- "additionalProperties": true,
831
- "properties": {},
832
- "default": {}
833
- },
834
- "requestParams": {
835
- "description": "URL parameters to include in the HTTP request, in key/value format.",
836
- "type": "object",
837
- "additionalProperties": true,
838
- "default": {},
839
- "properties": {}
840
- },
841
- "responseParams": {
842
- "description": "DEPRECATED.",
843
- "type": "object",
844
- "additionalProperties": true,
845
- "default": {},
846
- "properties": {}
847
- },
848
- "requestData": {
849
- "description": "JSON object to include as the body of the HTTP request.",
850
- "type": "object",
851
- "additionalProperties": true,
852
- "default": {},
853
- "properties": {}
854
- },
855
- "responseData": {
856
- "description": "JSON object expected in the response. If one or more key/value pairs aren't present in the response, the step fails.",
857
- "type": "object",
858
- "additionalProperties": true,
859
- "default": {},
860
- "properties": {}
861
- },
862
- "allowAdditionalFields": {
863
- "type": "boolean",
864
- "description": "If `false`, the step fails when the response data contains fields not specified in `responseData`.",
865
- "default": true
866
- },
867
- "savePath": {
868
- "type": "string",
869
- "description": "File path to save the command's output, relative to `saveDirectory`. Specify a file extension that matches the expected response type, such as `.json` for JSON content or `.txt` for strings."
870
- },
871
- "saveDirectory": {
872
- "type": "string",
873
- "description": "Directory to save the command's output. If the directory doesn't exist, creates the directory. If not specified, the directory is your media directory."
874
- },
875
- "maxVariation": {
876
- "type": "integer",
877
- "description": "Allowed variation in percentage of text different between the current output and previously saved output. If the difference between the current output and the previous output is greater than `maxVariation`, the step fails. If output doesn't exist at `savePath`, this value is ignored.",
878
- "default": 0,
879
- "minimum": 0,
880
- "maximum": 100
881
- },
882
- "overwrite": {
883
- "type": "string",
884
- "description": "If `true`, overwrites the existing output at `savePath` if it exists.\nIf `byVariation`, overwrites the existing output at `savePath` if the difference between the new output and the existing output is greater than `maxVariation`.",
885
- "enum": [
886
- "true",
887
- "false",
888
- "byVariation"
889
- ],
890
- "default": "false"
891
- },
892
- "envsFromResponseData": {
893
- "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.",
894
- "type": "array",
895
- "default": [],
896
- "items": {
897
- "oneOf": [
898
- {
899
- "description": "",
900
- "type": "object",
901
- "properties": {
902
- "name": {
903
- "description": "Name of the environment variable to set.",
904
- "type": "string"
905
- },
906
- "jqFilter": {
907
- "description": "jq filter to apply to the response data. If the filter doesn't return a value, the environment variable isn't set.",
908
- "type": "string"
909
- }
910
- },
911
- "required": [
912
- "name",
913
- "jqFilter"
914
- ]
915
- }
916
- ]
917
- }
918
- }
919
- },
920
- "dynamicDefaults": {
921
- "id": "uuid"
922
- },
923
- "anyOf": [
924
- {
925
- "required": [
926
- "url"
927
- ]
928
- },
929
- {
930
- "required": [
931
- "openApi"
932
- ]
933
- }
934
- ],
935
- "required": [
936
- "action"
937
- ],
938
- "additionalProperties": false,
939
- "examples": [
940
- {
941
- "action": "httpRequest",
942
- "url": "https://reqres.in/api/users"
943
- },
944
- {
945
- "action": "httpRequest",
946
- "url": "https://reqres.in/api/users/2",
947
- "method": "put",
948
- "requestData": {
949
- "name": "morpheus",
950
- "job": "zion resident"
951
- }
952
- },
953
- {
954
- "action": "httpRequest",
955
- "url": "https://reqres.in/api/users",
956
- "method": "post",
957
- "requestData": {
958
- "name": "morpheus",
959
- "job": "leader"
960
- },
961
- "responseData": {
962
- "name": "morpheus",
963
- "job": "leader"
964
- },
965
- "statusCodes": [
966
- 200,
967
- 201
968
- ]
969
- },
970
- {
971
- "action": "httpRequest",
972
- "url": "https://www.api-server.com",
973
- "method": "post",
974
- "timeout": 30000,
975
- "requestHeaders": {
976
- "header": "value"
977
- },
978
- "requestParams": {
979
- "param": "value"
980
- },
981
- "requestData": {
982
- "field": "value"
983
- },
984
- "responseHeaders": {
985
- "header": "value"
986
- },
987
- "responseData": {
988
- "field": "value"
989
- },
990
- "statusCodes": [
991
- 200
992
- ]
993
- },
994
- {
995
- "action": "httpRequest",
996
- "url": "https://reqres.in/api/users",
997
- "method": "post",
998
- "requestData": {
999
- "name": "morpheus",
1000
- "job": "leader"
1001
- },
1002
- "responseData": {
1003
- "name": "morpheus",
1004
- "job": "leader"
1005
- },
1006
- "statusCodes": [
1007
- 200,
1008
- 201
1009
- ],
1010
- "savePath": "response.json",
1011
- "saveDirectory": "media",
1012
- "maxVariation": 5,
1013
- "overwrite": "byVariation"
1014
- },
1015
- {
1016
- "action": "httpRequest",
1017
- "openApi": {
1018
- "name": "Reqres",
1019
- "operationId": "getUserById"
1020
- },
1021
- "requestParams": {
1022
- "id": 123
1023
- }
1024
- },
1025
- {
1026
- "action": "httpRequest",
1027
- "openApi": {
1028
- "descriptionPath": "https://api.example.com/openapi.json",
1029
- "operationId": "getUserById"
1030
- },
1031
- "requestParams": {
1032
- "id": 123
1033
- }
1034
- },
1035
- {
1036
- "action": "httpRequest",
1037
- "openApi": {
1038
- "descriptionPath": "https://api.example.com/openapi.json",
1039
- "operationId": "createUser",
1040
- "useExample": "both"
1041
- }
1042
- },
1043
- {
1044
- "action": "httpRequest",
1045
- "openApi": {
1046
- "descriptionPath": "https://api.example.com/openapi.json",
1047
- "operationId": "updateUser",
1048
- "useExample": "request",
1049
- "exampleKey": "acme"
1050
- }
1051
- },
1052
- {
1053
- "action": "httpRequest",
1054
- "openApi": {
1055
- "descriptionPath": "https://api.example.com/openapi.json",
1056
- "operationId": "updateUser",
1057
- "useExample": "request",
1058
- "exampleKey": "acme",
1059
- "requestHeaders": {
1060
- "Authorization": "Bearer $TOKEN"
1061
- }
1062
- }
1063
- }
1064
- ]
1065
- },
1066
- {
1067
- "title": "runCode",
1068
- "type": "object",
1069
- "description": "Assemble and run code.",
1070
- "properties": {
1071
- "id": {
1072
- "type": "string",
1073
- "description": "ID of the step."
1074
- },
1075
- "description": {
1076
- "type": "string",
1077
- "description": "Description of the step."
1078
- },
1079
- "action": {
1080
- "type": "string",
1081
- "const": "runCode",
1082
- "description": "The action to perform."
1083
- },
1084
- "language": {
1085
- "type": "string",
1086
- "description": "Language of the code to run. If not specified, the code is run in the shell.",
1087
- "enum": [
1088
- "python",
1089
- "bash",
1090
- "javascript"
1091
- ]
1092
- },
1093
- "code": {
1094
- "type": "string",
1095
- "description": "Code to run."
1096
- },
1097
- "args": {
1098
- "type": "array",
1099
- "description": "Arguments for the command.",
1100
- "items": {
1101
- "oneOf": [
1102
- {
1103
- "type": "string"
1104
- }
1105
- ]
1106
- },
1107
- "default": []
1108
- },
1109
- "workingDirectory": {
1110
- "type": "string",
1111
- "description": "Working directory for the command.",
1112
- "default": "."
1113
- },
1114
- "exitCodes": {
1115
- "type": "array",
1116
- "description": "Expected exit codes of the command. If the command's actual exit code isn't in this list, the step fails.",
1117
- "items": {
1118
- "oneOf": [
1119
- {
1120
- "type": "integer"
1121
- }
1122
- ]
1123
- },
1124
- "default": [
1125
- 0
1126
- ]
1127
- },
1128
- "output": {
1129
- "type": "string",
1130
- "description": "Content expected in the command's output. If the expected content can't be found in the command's output (either stdout or stderr), the step fails. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/^hello-world.*/`."
1131
- },
1132
- "savePath": {
1133
- "type": "string",
1134
- "description": "File path to save the command's output, relative to `saveDirectory`."
1135
- },
1136
- "saveDirectory": {
1137
- "type": "string",
1138
- "description": "Directory to save the command's output. If the directory doesn't exist, creates the directory. If not specified, the directory is your media directory."
1139
- },
1140
- "maxVariation": {
1141
- "type": "integer",
1142
- "description": "Allowed variation in percentage of text different between the current output and previously saved output. If the difference between the current output and the previous output is greater than `maxVariation`, the step fails. If output doesn't exist at `savePath`, this value is ignored.",
1143
- "default": 0,
1144
- "minimum": 0,
1145
- "maximum": 100
1146
- },
1147
- "overwrite": {
1148
- "type": "string",
1149
- "description": "If `true`, overwrites the existing output at `savePath` if it exists.\nIf `byVariation`, overwrites the existing output at `savePath` if the difference between the new output and the existing output is greater than `maxVariation`.",
1150
- "enum": [
1151
- "true",
1152
- "false",
1153
- "byVariation"
1154
- ],
1155
- "default": "false"
1156
- },
1157
- "timeout": {
1158
- "type": "integer",
1159
- "description": "Max time in milliseconds the command is allowed to run. If the command runs longer than this, the step fails.",
1160
- "default": 60000
1161
- },
1162
- "setVariables": {
1163
- "type": "array",
1164
- "description": "Extract environment variables from the command's output.",
1165
- "items": {
1166
- "oneOf": [
1167
- {
1168
- "description": "",
1169
- "type": "object",
1170
- "properties": {
1171
- "name": {
1172
- "description": "Name of the environment variable to set.",
1173
- "type": "string"
1174
- },
1175
- "regex": {
1176
- "description": "Regex to extract the environment variable from the command's output.",
1177
- "type": "string"
1178
- }
1179
- },
1180
- "required": [
1181
- "name",
1182
- "regex"
1183
- ]
1184
- }
1185
- ]
1186
- },
1187
- "default": []
1188
- },
1189
- "outputs": {
1190
- "type": "object",
1191
- "description": "Outputs from step processes and user-defined expressions. Use the `outputs` object to reference outputs in subsequent steps. If a user-defined output matches the key for a step-defined output, the user-defined output takes precedence.",
1192
- "patternProperties": {
1193
- "^[A-Za-z0-9_]+$": {
1194
- "type": "string",
1195
- "description": "Runtime expression for a user-defined output value."
1196
- }
1197
- },
1198
- "properties": {
1199
- "stdout": {
1200
- "type": "string",
1201
- "description": "Standard output of the command.",
1202
- "readOnly": true
1203
- },
1204
- "stderr": {
1205
- "type": "string",
1206
- "description": "Standard error of the command.",
1207
- "readOnly": true
1208
- },
1209
- "exitCode": {
1210
- "type": "integer",
1211
- "description": "Exit code of the command.",
1212
- "readOnly": true
1213
- }
1214
- }
1215
- }
1216
- },
1217
- "dynamicDefaults": {
1218
- "id": "uuid"
1219
- },
1220
- "additionalProperties": false,
1221
- "required": [
1222
- "action",
1223
- "code",
1224
- "language"
1225
- ],
1226
- "examples": [
1227
- {
1228
- "action": "runCode",
1229
- "language": "javascript",
1230
- "code": "console.log('Hello, ${process.env.USER}!');"
1231
- },
1232
- {
1233
- "action": "runCode",
1234
- "language": "bash",
1235
- "code": "docker run hello-world",
1236
- "timeout": 20000,
1237
- "exitCodes": [
1238
- 0
1239
- ],
1240
- "output": "Hello from Docker!"
1241
- },
1242
- {
1243
- "action": "runCode",
1244
- "language": "javascript",
1245
- "code": "return false",
1246
- "exitCodes": [
1247
- 1
1248
- ]
1249
- },
1250
- {
1251
- "action": "runCode",
1252
- "language": "python",
1253
- "code": "print('Hello from Python')",
1254
- "workingDirectory": ".",
1255
- "exitCodes": [
1256
- 0
1257
- ],
1258
- "output": "Hello from Python!",
1259
- "savePath": "python-output.txt",
1260
- "saveDirectory": "output",
1261
- "maxVariation": 10,
1262
- "overwrite": "byVariation"
1263
- }
1264
- ]
1265
- },
1266
- {
1267
- "title": "runShell",
1268
- "type": "object",
1269
- "description": "Perform a native shell command.",
1270
- "properties": {
1271
- "id": {
1272
- "type": "string",
1273
- "description": "ID of the step."
1274
- },
1275
- "description": {
1276
- "type": "string",
1277
- "description": "Description of the step."
1278
- },
1279
- "action": {
1280
- "type": "string",
1281
- "const": "runShell",
1282
- "description": "The action to perform."
1283
- },
1284
- "command": {
1285
- "type": "string",
1286
- "description": "Command to perform in the machine's default shell."
1287
- },
1288
- "args": {
1289
- "type": "array",
1290
- "description": "Arguments for the command.",
1291
- "items": {
1292
- "oneOf": [
1293
- {
1294
- "type": "string"
1295
- }
1296
- ]
1297
- },
1298
- "default": []
1299
- },
1300
- "workingDirectory": {
1301
- "type": "string",
1302
- "description": "Working directory for the command.",
1303
- "default": "."
1304
- },
1305
- "exitCodes": {
1306
- "type": "array",
1307
- "description": "Expected exit codes of the command. If the command's actual exit code isn't in this list, the step fails.",
1308
- "items": {
1309
- "oneOf": [
1310
- {
1311
- "type": "integer"
1312
- }
1313
- ]
1314
- },
1315
- "default": [
1316
- 0
1317
- ]
1318
- },
1319
- "output": {
1320
- "type": "string",
1321
- "description": "Content expected in the command's output. If the expected content can't be found in the command's output (either stdout or stderr), the step fails. Supports strings and regular expressions. To use a regular expression, the string must start and end with a forward slash, like in `/^hello-world.*/`."
1322
- },
1323
- "savePath": {
1324
- "type": "string",
1325
- "description": "File path to save the command's output, relative to `saveDirectory`."
1326
- },
1327
- "saveDirectory": {
1328
- "type": "string",
1329
- "description": "Directory to save the command's output. If the directory doesn't exist, creates the directory. If not specified, the directory is your media directory."
1330
- },
1331
- "maxVariation": {
1332
- "type": "integer",
1333
- "description": "Allowed variation in percentage of text different between the current output and previously saved output. If the difference between the current output and the previous output is greater than `maxVariation`, the step fails. If output doesn't exist at `savePath`, this value is ignored.",
1334
- "default": 0,
1335
- "minimum": 0,
1336
- "maximum": 100
1337
- },
1338
- "overwrite": {
1339
- "type": "string",
1340
- "description": "If `true`, overwrites the existing output at `savePath` if it exists.\nIf `byVariation`, overwrites the existing output at `savePath` if the difference between the new output and the existing output is greater than `maxVariation`.",
1341
- "enum": [
1342
- "true",
1343
- "false",
1344
- "byVariation"
1345
- ],
1346
- "default": "false"
1347
- },
1348
- "timeout": {
1349
- "type": "integer",
1350
- "description": "Max time in milliseconds the command is allowed to run. If the command runs longer than this, the step fails.",
1351
- "default": 60000
1352
- },
1353
- "setVariables": {
1354
- "type": "array",
1355
- "description": "Extract environment variables from the command's output.",
1356
- "items": {
1357
- "oneOf": [
1358
- {
1359
- "description": "",
1360
- "type": "object",
1361
- "properties": {
1362
- "name": {
1363
- "description": "Name of the environment variable to set.",
1364
- "type": "string"
1365
- },
1366
- "regex": {
1367
- "description": "Regex to extract the environment variable from the command's output.",
1368
- "type": "string"
1369
- }
1370
- },
1371
- "required": [
1372
- "name",
1373
- "regex"
1374
- ]
1375
- }
1376
- ]
1377
- },
1378
- "default": []
1379
- }
1380
- },
1381
- "dynamicDefaults": {
1382
- "id": "uuid"
1383
- },
1384
- "additionalProperties": false,
1385
- "required": [
1386
- "action",
1387
- "command"
1388
- ],
1389
- "examples": [
1390
- {
1391
- "action": "runShell",
1392
- "command": "echo",
1393
- "args": [
1394
- "$USER"
1395
- ]
1396
- },
1397
- {
1398
- "action": "runShell",
1399
- "command": "echo",
1400
- "args": [
1401
- "hello-world"
1402
- ],
1403
- "id": "ddec5e20-2e81-4f38-867c-92c8d9516755",
1404
- "description": "This is a test!"
1405
- },
1406
- {
1407
- "action": "runShell",
1408
- "command": "docker run hello-world",
1409
- "timeout": 20000,
1410
- "exitCodes": [
1411
- 0
1412
- ],
1413
- "output": "Hello from Docker!"
1414
- },
1415
- {
1416
- "action": "runShell",
1417
- "command": "false",
1418
- "exitCodes": [
1419
- 1
1420
- ]
1421
- },
1422
- {
1423
- "action": "runShell",
1424
- "command": "echo",
1425
- "args": [
1426
- "setup"
1427
- ],
1428
- "exitCodes": [
1429
- 0
1430
- ],
1431
- "output": "/.*?/",
1432
- "setVariables": [
1433
- {
1434
- "name": "TEST",
1435
- "regex": ".*"
1436
- }
1437
- ]
1438
- },
1439
- {
1440
- "action": "runShell",
1441
- "command": "docker run hello-world",
1442
- "workingDirectory": ".",
1443
- "exitCodes": [
1444
- 0
1445
- ],
1446
- "output": "Hello from Docker!",
1447
- "savePath": "docker-output.txt",
1448
- "saveDirectory": "output",
1449
- "maxVariation": 10,
1450
- "overwrite": "byVariation"
1451
- }
1452
- ]
1453
- },
1454
- {
1455
- "title": "saveScreenshot",
1456
- "type": "object",
1457
- "description": "Takes a screenshot in PNG format.",
1458
- "properties": {
1459
- "id": {
1460
- "type": "string",
1461
- "description": "ID of the step."
1462
- },
1463
- "description": {
1464
- "type": "string",
1465
- "description": "Description of the step."
1466
- },
1467
- "action": {
1468
- "type": "string",
1469
- "const": "saveScreenshot",
1470
- "description": "The action to perform."
1471
- },
1472
- "path": {
1473
- "type": "string",
1474
- "description": "File path of the PNG file, relative to `directory`. If not specified, the file name is the ID of the step.",
1475
- "pattern": "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)"
1476
- },
1477
- "directory": {
1478
- "type": "string",
1479
- "description": "Directory of the PNG file. If the directory doesn't exist, creates the directory."
1480
- },
1481
- "maxVariation": {
1482
- "type": "number",
1483
- "description": "Allowed variation in percentage of pixels between the new screenshot and the existing 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.",
1484
- "default": 5,
1485
- "minimum": 0,
1486
- "maximum": 100
1487
- },
1488
- "overwrite": {
1489
- "type": "string",
1490
- "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`.",
1491
- "enum": [
1492
- "true",
1493
- "false",
1494
- "byVariation"
1495
- ],
1496
- "default": "false"
1497
- },
1498
- "crop": {
1499
- "type": "object",
1500
- "description": "Crops the screenshot.",
1501
- "properties": {
1502
- "selector": {
1503
- "type": "string",
1504
- "description": "Selector of the element to crop the image to."
1505
- },
1506
- "padding": {
1507
- "oneOf": [
1508
- {
1509
- "type": "number",
1510
- "description": "Padding in pixels to add to the bounds of the element.",
1511
- "minimum": 0
1512
- },
1513
- {
1514
- "type": "object",
1515
- "properties": {
1516
- "top": {
1517
- "type": "number",
1518
- "minimum": 0
1519
- },
1520
- "right": {
1521
- "type": "number",
1522
- "minimum": 0
1523
- },
1524
- "bottom": {
1525
- "type": "number",
1526
- "minimum": 0
1527
- },
1528
- "left": {
1529
- "type": "number",
1530
- "minimum": 0
1531
- }
1532
- }
1533
- }
1534
- ]
1535
- }
1536
- },
1537
- "required": [
1538
- "selector"
1539
- ],
1540
- "additionalProperties": false
1541
- }
1542
- },
1543
- "dynamicDefaults": {
1544
- "id": "uuid"
1545
- },
1546
- "required": [
1547
- "action"
1548
- ],
1549
- "additionalProperties": false,
1550
- "examples": [
1551
- {
1552
- "action": "saveScreenshot"
1553
- },
1554
- {
1555
- "action": "saveScreenshot",
1556
- "path": "results.png"
1557
- },
1558
- {
1559
- "action": "saveScreenshot",
1560
- "path": "results.png",
1561
- "directory": "static/images"
1562
- },
1563
- {
1564
- "action": "saveScreenshot",
1565
- "path": "results.png",
1566
- "directory": "static/images",
1567
- "maxVariation": 10,
1568
- "overwrite": "byVariation"
1569
- },
1570
- {
1571
- "action": "saveScreenshot",
1572
- "path": "results.png",
1573
- "directory": "static/images",
1574
- "crop": {
1575
- "selector": "#element"
1576
- }
1577
- },
1578
- {
1579
- "action": "saveScreenshot",
1580
- "path": "results.png",
1581
- "directory": "static/images",
1582
- "crop": {
1583
- "selector": "#element",
1584
- "padding": 10
1585
- }
1586
- },
1587
- {
1588
- "action": "saveScreenshot",
1589
- "path": "results.png",
1590
- "directory": "static/images",
1591
- "crop": {
1592
- "selector": "#element",
1593
- "padding": {
1594
- "top": 10,
1595
- "right": 20,
1596
- "bottom": 30,
1597
- "left": 40
1598
- }
1599
- }
1600
- }
1601
- ]
1602
- },
1603
- {
1604
- "title": "setVariables",
1605
- "type": "object",
1606
- "description": "Load environment variables from a `.env` file.",
1607
- "properties": {
1608
- "id": {
1609
- "type": "string",
1610
- "description": "ID of the step."
1611
- },
1612
- "description": {
1613
- "type": "string",
1614
- "description": "Description of the step."
1615
- },
1616
- "action": {
1617
- "type": "string",
1618
- "const": "setVariables",
1619
- "description": "Action to perform."
1620
- },
1621
- "path": {
1622
- "type": "string",
1623
- "description": "Path to the `.env` file."
1624
- }
1625
- },
1626
- "dynamicDefaults": {
1627
- "id": "uuid"
1628
- },
1629
- "required": [
1630
- "action",
1631
- "path"
1632
- ],
1633
- "additionalProperties": false,
1634
- "examples": [
1635
- {
1636
- "action": "setVariables",
1637
- "path": ".env"
1638
- }
1639
- ]
1640
- },
1641
- {
1642
- "title": "startRecording",
1643
- "type": "object",
1644
- "description": "Start recording the current browser viewport. Must be followed by a `stopRecording` action. Only runs when the context `app` is `chrome` and `headless` is `false`. Supported extensions: [ '.mp4', '.webm', '.gif' ]",
1645
- "properties": {
1646
- "id": {
1647
- "type": "string",
1648
- "description": "ID of the step."
1649
- },
1650
- "description": {
1651
- "type": "string",
1652
- "description": "Description of the step."
1653
- },
1654
- "action": {
1655
- "type": "string",
1656
- "const": "startRecording",
1657
- "description": "The action to perform."
1658
- },
1659
- "path": {
1660
- "type": "string",
1661
- "description": "File path of the recording. Supports the `.mp4`, `.webm`, and `.gif` extensions. If not specified, the file name is the ID of the step, and the extension is `.mp4`.",
1662
- "pattern": "([A-Za-z0-9_-]*\\.(mp4|webm|gif)$|\\$[A-Za-z0-9_]+)"
1663
- },
1664
- "directory": {
1665
- "type": "string",
1666
- "description": "Directory of the file. Attempts to create the directory if it doesn't exist."
1667
- },
1668
- "overwrite": {
1669
- "type": "boolean",
1670
- "description": "If `true`, overwrites the existing file at `path` if it exists.",
1671
- "default": false
1672
- }
1673
- },
1674
- "dynamicDefaults": {
1675
- "id": "uuid"
1676
- },
1677
- "required": [
1678
- "action"
1679
- ],
1680
- "additionalProperties": false,
1681
- "examples": [
1682
- {
1683
- "action": "startRecording"
1684
- },
1685
- {
1686
- "action": "startRecording",
1687
- "path": "results.mp4"
1688
- },
1689
- {
1690
- "action": "startRecording",
1691
- "path": "results.mp4",
1692
- "directory": "static/media",
1693
- "overwrite": true
1694
- }
1695
- ]
1696
- },
1697
- {
1698
- "title": "stopRecording",
1699
- "type": "object",
1700
- "description": "Stop the current recording.",
1701
- "properties": {
1702
- "id": {
1703
- "type": "string",
1704
- "description": "ID of the step."
1705
- },
1706
- "description": {
1707
- "type": "string",
1708
- "description": "Description of the step."
1709
- },
1710
- "action": {
1711
- "type": "string",
1712
- "const": "stopRecording",
1713
- "description": "The action to perform."
1714
- }
1715
- },
1716
- "dynamicDefaults": {
1717
- "id": "uuid"
1718
- },
1719
- "required": [
1720
- "action"
1721
- ],
1722
- "additionalProperties": false,
1723
- "examples": [
1724
- {
1725
- "action": "stopRecording"
1726
- }
1727
- ]
1728
- },
1729
- {
1730
- "title": "typeKeys",
1731
- "type": "object",
1732
- "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$`.",
1733
- "properties": {
1734
- "id": {
1735
- "type": "string",
1736
- "description": "ID of the step."
1737
- },
1738
- "description": {
1739
- "type": "string",
1740
- "description": "Description of the step."
1741
- },
1742
- "action": {
1743
- "type": "string",
1744
- "const": "typeKeys",
1745
- "description": "The action to perform."
1746
- },
1747
- "keys": {
1748
- "description": "String of keys to enter.",
1749
- "anyOf": [
1750
- {
1751
- "type": "string"
1752
- },
1753
- {
1754
- "type": "array",
1755
- "items": {
1756
- "oneOf": [
1757
- {
1758
- "type": "string"
1759
- }
1760
- ]
1761
- }
1762
- }
1763
- ]
1764
- },
1765
- "delay": {
1766
- "type": "number",
1767
- "description": "Delay in milliseconds between each key press. Only valid during a recording.",
1768
- "default": 100
1769
- }
1770
- },
1771
- "dynamicDefaults": {
1772
- "id": "uuid"
1773
- },
1774
- "required": [
1775
- "action",
1776
- "keys"
1777
- ],
1778
- "additionalProperties": false,
1779
- "examples": [
1780
- {
1781
- "action": "typeKeys",
1782
- "keys": "kittens"
1783
- },
1784
- {
1785
- "action": "typeKeys",
1786
- "keys": [
1787
- "$ENTER$"
1788
- ]
1789
- },
1790
- {
1791
- "action": "typeKeys",
1792
- "keys": [
1793
- "kittens",
1794
- "$ENTER$"
1795
- ],
1796
- "delay": 500
1797
- }
1798
- ]
1799
- },
1800
- {
1801
- "title": "find",
1802
- "type": "object",
1803
- "description": "Check if an element exists with the specified CSS selector.",
1804
- "properties": {
1805
- "id": {
1806
- "type": "string",
1807
- "description": "ID of the step."
1808
- },
1809
- "description": {
1810
- "type": "string",
1811
- "description": "Description of the step."
1812
- },
1813
- "action": {
1814
- "type": "string",
1815
- "const": "find",
1816
- "description": "Action to perform."
1817
- },
1818
- "selector": {
1819
- "description": "Selector that uniquely identifies the element.",
1820
- "type": "string"
1821
- },
1822
- "timeout": {
1823
- "type": "integer",
1824
- "description": "Max duration in milliseconds to wait for the element to exist.",
1825
- "default": 5000
1826
- },
1827
- "matchText": {
1828
- "type": "string",
1829
- "description": "Text that the element should contain. If the element doesn't contain the text, the step fails. Accepts both strings and regular expressions. To use a regular expression, the expression should start and end with a `/`. For example, `/search/`."
1830
- },
1831
- "moveTo": {
1832
- "description": "Move to the element. If the element isn't visible, it's scrolled into view. Only runs if the test is being recorded.",
1833
- "oneOf": [
1834
- {
1835
- "type": "boolean"
1836
- }
1837
- ],
1838
- "default": false
1839
- },
1840
- "click": {
1841
- "description": "Click the element.",
1842
- "oneOf": [
1843
- {
1844
- "type": "boolean",
1845
- "default": false
1846
- },
1847
- {
1848
- "type": "object",
1849
- "additionalProperties": false,
1850
- "properties": {
1851
- "button": {
1852
- "description": "Kind of click to perform.",
1853
- "type": "string",
1854
- "enum": [
1855
- "left",
1856
- "right",
1857
- "middle"
1858
- ]
1859
- }
1860
- }
1861
- }
1862
- ]
1863
- },
1864
- "typeKeys": {
1865
- "description": "Type keys after finding the element. Either a string or an object with a `keys` field as defined in [`typeKeys`](typeKeys). To type in the element, make the element active with the `click` parameter.",
1866
- "oneOf": [
1867
- {
1868
- "type": "string"
1869
- },
1870
- {
1871
- "type": "object",
1872
- "additionalProperties": false,
1873
- "properties": {
1874
- "keys": {
1875
- "description": "String of keys to enter.",
1876
- "anyOf": [
1877
- {
1878
- "type": "string"
1879
- },
1880
- {
1881
- "type": "array",
1882
- "items": {
1883
- "oneOf": [
1884
- {
1885
- "type": "string"
1886
- }
1887
- ]
1888
- }
1889
- }
1890
- ]
1891
- },
1892
- "delay": {
1893
- "type": "number",
1894
- "description": "Delay in milliseconds between each key press. Only valid during a recording.",
1895
- "default": 100
1896
- }
1897
- }
1898
- }
1899
- ]
1900
- },
1901
- "setVariables": {
1902
- "type": "array",
1903
- "description": "Extract environment variables from the element's text.",
1904
- "items": {
1905
- "oneOf": [
1906
- {
1907
- "description": "",
1908
- "type": "object",
1909
- "properties": {
1910
- "name": {
1911
- "description": "Name of the environment variable to set.",
1912
- "type": "string"
1913
- },
1914
- "regex": {
1915
- "description": "Regex to extract the environment variable from the element's text.",
1916
- "type": "string"
1917
- }
1918
- },
1919
- "required": [
1920
- "name",
1921
- "regex"
1922
- ]
1923
- }
1924
- ]
1925
- },
1926
- "default": []
1927
- }
1928
- },
1929
- "required": [
1930
- "action",
1931
- "selector"
1932
- ],
1933
- "dynamicDefaults": {
1934
- "id": "uuid"
1935
- },
1936
- "additionalProperties": false,
1937
- "examples": [
1938
- {
1939
- "action": "find",
1940
- "selector": "[title=Search]"
1941
- },
1942
- {
1943
- "action": "find",
1944
- "selector": "[title=Search]",
1945
- "timeout": 10000,
1946
- "matchText": "Search",
1947
- "moveTo": true,
1948
- "click": true,
1949
- "typeKeys": "shorthair cat"
1950
- },
1951
- {
1952
- "action": "find",
1953
- "selector": "[title=Search]",
1954
- "click": {
1955
- "button": "right"
1956
- }
1957
- },
1958
- {
1959
- "action": "find",
1960
- "selector": "[title=Search]",
1961
- "timeout": 10000,
1962
- "matchText": "Search",
1963
- "moveTo": true,
1964
- "click": true,
1965
- "typeKeys": {
1966
- "keys": [
1967
- "shorthair cat"
1968
- ],
1969
- "delay": 100
1970
- }
1971
- },
1972
- {
1973
- "action": "find",
1974
- "selector": "[title=ResultsCount]",
1975
- "setVariables": [
1976
- {
1977
- "name": "resultsCount",
1978
- "regex": ".*"
1979
- }
1980
- ]
1981
- }
1982
- ]
1983
- },
1984
- {
1985
- "title": "wait",
1986
- "type": "object",
1987
- "description": "Pause before performing the next action.",
1988
- "properties": {
1989
- "id": {
1990
- "type": "string",
1991
- "description": "ID of the step."
1992
- },
1993
- "description": {
1994
- "type": "string",
1995
- "description": "Description of the step."
1996
- },
1997
- "action": {
1998
- "type": "string",
1999
- "const": "wait",
2000
- "description": "The action to perform."
2001
- },
2002
- "duration": {
2003
- "type": "number",
2004
- "description": "Milliseconds to wait.",
2005
- "default": 5000
2006
- }
2007
- },
2008
- "dynamicDefaults": {
2009
- "id": "uuid"
2010
- },
2011
- "required": [
2012
- "action"
2013
- ],
2014
- "additionalProperties": false,
2015
- "examples": [
2016
- {
2017
- "action": "wait"
2018
- },
2019
- {
2020
- "action": "wait",
2021
- "duration": 5000
2022
- }
2023
- ]
2024
- }
2025
- ]
2026
- }
2027
- }
2028
- },
2029
- "dynamicDefaults": {
2030
- "id": "uuid"
2031
- },
2032
- "required": [
2033
- "steps"
2034
- ],
2035
- "additionalProperties": false,
2036
- "examples": [
2037
- {
2038
- "steps": [
2039
- {
2040
- "action": "checkLink",
2041
- "url": "https://www.duckduckgo.com"
2042
- }
2043
- ]
2044
- },
2045
- {
2046
- "steps": [
2047
- {
2048
- "action": "goTo",
2049
- "url": "https://www.duckduckgo.com"
2050
- },
2051
- {
2052
- "action": "find",
2053
- "selector": "[title=Search]",
2054
- "click": true,
2055
- "typeKeys": {
2056
- "keys": [
2057
- "shorthair cats",
2058
- "$ENTER$"
2059
- ]
2060
- }
2061
- }
2062
- ]
2063
- },
2064
- {
2065
- "id": "Do all the things! - Test",
2066
- "description": "This test includes every property across all actions.",
2067
- "contexts": [
2068
- {
2069
- "app": {
2070
- "name": "firefox",
2071
- "path": "/usr/bin/firefox"
2072
- },
2073
- "platforms": [
2074
- "linux"
2075
- ]
2076
- }
2077
- ],
2078
- "setup": "setup.json",
2079
- "cleanup": "cleanup.json",
2080
- "steps": [
2081
- {
2082
- "action": "setVariables",
2083
- "path": ".env"
2084
- },
2085
- {
2086
- "action": "runShell",
2087
- "command": "echo",
2088
- "args": [
2089
- "$USER"
2090
- ]
2091
- },
2092
- {
2093
- "action": "checkLink",
2094
- "url": "https://www.duckduckgo.com"
2095
- },
2096
- {
2097
- "action": "httpRequest",
2098
- "url": "https://reqres.in/api/users",
2099
- "method": "post",
2100
- "requestData": {
2101
- "name": "morpheus",
2102
- "job": "leader"
2103
- },
2104
- "responseData": {
2105
- "name": "morpheus",
2106
- "job": "leader"
2107
- },
2108
- "statusCodes": [
2109
- 200,
2110
- 201
2111
- ]
2112
- },
2113
- {
2114
- "action": "goTo",
2115
- "url": "https://www.duckduckgo.com"
2116
- },
2117
- {
2118
- "action": "find",
2119
- "selector": "[title=Search]",
2120
- "timeout": 10000,
2121
- "matchText": "Search",
2122
- "moveTo": true,
2123
- "click": true,
2124
- "typeKeys": {
2125
- "keys": [
2126
- "shorthair cat"
2127
- ]
2128
- }
2129
- },
2130
- {
2131
- "action": "typeKeys",
2132
- "keys": [
2133
- "$ENTER$"
2134
- ]
2135
- },
2136
- {
2137
- "action": "saveScreenshot"
2138
- }
2139
- ]
2140
- },
2141
- {
2142
- "openApi": [
2143
- {
2144
- "name": "Acme",
2145
- "descriptionPath": "https://www.acme.com/openapi.json",
2146
- "server": "https://api.acme.com"
2147
- }
2148
- ],
2149
- "steps": [
2150
- {
2151
- "action": "httpRequest",
2152
- "openApi": {
2153
- "operationId": "getUserById"
2154
- },
2155
- "requestParams": {
2156
- "id": 123
2157
- }
2158
- }
2159
- ]
2160
- }
2161
- ]
2162
- }
2163
- ]
2164
- }
2165
- }
2166
- },
2167
- "required": [
2168
- "tests"
2169
- ],
2170
- "examples": [
2171
- {
2172
- "tests": [
2173
- {
2174
- "steps": [
2175
- {
2176
- "action": "checkLink",
2177
- "url": "https://www.duckduckgo.com"
2178
- }
2179
- ]
2180
- }
2181
- ]
2182
- },
2183
- {
2184
- "id": "Do all the things! - Spec",
2185
- "contexts": [
2186
- {
2187
- "app": {
2188
- "name": "chrome",
2189
- "path": "/usr/bin/firefox"
2190
- },
2191
- "platforms": [
2192
- "windows",
2193
- "mac"
2194
- ]
2195
- }
2196
- ],
2197
- "tests": [
2198
- {
2199
- "id": "Do all the things! - Test",
2200
- "description": "This test includes nearly every property across all actions.",
2201
- "contexts": [
2202
- {
2203
- "app": {
2204
- "name": "firefox",
2205
- "path": "/usr/bin/firefox"
2206
- },
2207
- "platforms": [
2208
- "linux"
2209
- ]
2210
- }
2211
- ],
2212
- "steps": [
2213
- {
2214
- "action": "setVariables",
2215
- "path": ".env"
2216
- },
2217
- {
2218
- "action": "runShell",
2219
- "command": "echo",
2220
- "args": [
2221
- "$USER"
2222
- ]
2223
- },
2224
- {
2225
- "action": "checkLink",
2226
- "url": "https://www.duckduckgo.com"
2227
- },
2228
- {
2229
- "action": "httpRequest",
2230
- "url": "https://reqres.in/api/users",
2231
- "method": "post",
2232
- "requestData": {
2233
- "name": "morpheus",
2234
- "job": "leader"
2235
- },
2236
- "responseData": {
2237
- "name": "morpheus",
2238
- "job": "leader"
2239
- },
2240
- "statusCodes": [
2241
- 200,
2242
- 201
2243
- ]
2244
- },
2245
- {
2246
- "action": "goTo",
2247
- "url": "https://www.duckduckgo.com"
2248
- },
2249
- {
2250
- "action": "find",
2251
- "selector": "[title=Search]",
2252
- "timeout": 10000,
2253
- "matchText": "Search",
2254
- "moveTo": true,
2255
- "click": true,
2256
- "typeKeys": {
2257
- "keys": [
2258
- "shorthair cat"
2259
- ]
2260
- }
2261
- },
2262
- {
2263
- "action": "typeKeys",
2264
- "keys": [
2265
- "$ENTER$"
2266
- ]
2267
- },
2268
- {
2269
- "action": "saveScreenshot"
2270
- }
2271
- ]
2272
- }
2273
- ]
2274
- },
2275
- {
2276
- "id": "Make a request from an OpenAPI definition",
2277
- "openApi": [
2278
- {
2279
- "name": "Acme",
2280
- "descriptionPath": "https://www.acme.com/openapi.json",
2281
- "server": "https://api.acme.com"
2282
- }
2283
- ],
2284
- "tests": [
2285
- {
2286
- "steps": [
2287
- {
2288
- "action": "httpRequest",
2289
- "openApi": {
2290
- "operationId": "getUserById"
2291
- },
2292
- "requestParams": {
2293
- "id": 123
2294
- }
2295
- }
2296
- ]
2297
- }
2298
- ]
2299
- }
2300
- ]
2301
- }