doc-detective-common 1.18.0-dev.2 → 1.18.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/schemas/output_schemas/config_v2.schema.json +130 -4
- package/src/schemas/output_schemas/find_v2.schema.json +38 -1
- package/src/schemas/output_schemas/httpRequest_v2.schema.json +51 -0
- package/src/schemas/output_schemas/runShell_v2.schema.json +37 -0
- package/src/schemas/output_schemas/saveScreenshot_v2.schema.json +4 -3
- package/src/schemas/output_schemas/spec_v2.schema.json +130 -4
- package/src/schemas/output_schemas/test_v2.schema.json +130 -4
- package/src/schemas/schemas.json +520 -16
- package/src/schemas/src_schemas/find_v2.schema.json +133 -99
- package/src/schemas/src_schemas/httpRequest_v2.schema.json +48 -0
- package/src/schemas/src_schemas/runShell_v2.schema.json +160 -125
- package/src/schemas/src_schemas/saveScreenshot_v2.schema.json +73 -72
package/package.json
CHANGED
|
@@ -611,7 +611,7 @@
|
|
|
611
611
|
},
|
|
612
612
|
"matchText": {
|
|
613
613
|
"type": "string",
|
|
614
|
-
"description": "Text that the element should contain. If the element doesn't contain the text, the step fails."
|
|
614
|
+
"description": "Text that the element should contain. If the element doesn't contain the text, the step fails. Accepts both strings an regular expressions. To use a regular expression, the expression should start and end with a `/`. For example, `/search/`."
|
|
615
615
|
},
|
|
616
616
|
"moveTo": {
|
|
617
617
|
"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.",
|
|
@@ -663,6 +663,33 @@
|
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
]
|
|
666
|
+
},
|
|
667
|
+
"setVariables": {
|
|
668
|
+
"type": "array",
|
|
669
|
+
"description": "Extract environment variables from the element's text.",
|
|
670
|
+
"items": {
|
|
671
|
+
"oneOf": [
|
|
672
|
+
{
|
|
673
|
+
"description": "",
|
|
674
|
+
"type": "object",
|
|
675
|
+
"properties": {
|
|
676
|
+
"name": {
|
|
677
|
+
"description": "Name of the environment variable to set.",
|
|
678
|
+
"type": "string"
|
|
679
|
+
},
|
|
680
|
+
"regex": {
|
|
681
|
+
"description": "Regex to extract the environment variable from the element's text.",
|
|
682
|
+
"type": "string"
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
"required": [
|
|
686
|
+
"name",
|
|
687
|
+
"regex"
|
|
688
|
+
]
|
|
689
|
+
}
|
|
690
|
+
]
|
|
691
|
+
},
|
|
692
|
+
"default": []
|
|
666
693
|
}
|
|
667
694
|
},
|
|
668
695
|
"required": [
|
|
@@ -700,6 +727,16 @@
|
|
|
700
727
|
],
|
|
701
728
|
"delay": 100
|
|
702
729
|
}
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
"action": "find",
|
|
733
|
+
"selector": "[title=ResultsCount]",
|
|
734
|
+
"setVariables": [
|
|
735
|
+
{
|
|
736
|
+
"name": "resultsCount",
|
|
737
|
+
"regex": ".*"
|
|
738
|
+
}
|
|
739
|
+
]
|
|
703
740
|
}
|
|
704
741
|
]
|
|
705
742
|
},
|
|
@@ -868,6 +905,36 @@
|
|
|
868
905
|
"default": {},
|
|
869
906
|
"properties": {}
|
|
870
907
|
},
|
|
908
|
+
"allowAdditionalFields": {
|
|
909
|
+
"type": "boolean",
|
|
910
|
+
"description": "If `false`, the step fails when the response data contains fields not specified in `responseData`.",
|
|
911
|
+
"default": true
|
|
912
|
+
},
|
|
913
|
+
"savePath": {
|
|
914
|
+
"type": "string",
|
|
915
|
+
"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."
|
|
916
|
+
},
|
|
917
|
+
"saveDirectory": {
|
|
918
|
+
"type": "string",
|
|
919
|
+
"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."
|
|
920
|
+
},
|
|
921
|
+
"maxVariation": {
|
|
922
|
+
"type": "integer",
|
|
923
|
+
"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.",
|
|
924
|
+
"default": 0,
|
|
925
|
+
"minimum": 0,
|
|
926
|
+
"maximum": 100
|
|
927
|
+
},
|
|
928
|
+
"overwrite": {
|
|
929
|
+
"type": "string",
|
|
930
|
+
"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`.",
|
|
931
|
+
"enum": [
|
|
932
|
+
"true",
|
|
933
|
+
"false",
|
|
934
|
+
"byVariation"
|
|
935
|
+
],
|
|
936
|
+
"default": "false"
|
|
937
|
+
},
|
|
871
938
|
"envsFromResponseData": {
|
|
872
939
|
"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.",
|
|
873
940
|
"type": "array",
|
|
@@ -958,6 +1025,27 @@
|
|
|
958
1025
|
"statusCodes": [
|
|
959
1026
|
200
|
|
960
1027
|
]
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"action": "httpRequest",
|
|
1031
|
+
"url": "https://reqres.in/api/users",
|
|
1032
|
+
"method": "post",
|
|
1033
|
+
"requestData": {
|
|
1034
|
+
"name": "morpheus",
|
|
1035
|
+
"job": "leader"
|
|
1036
|
+
},
|
|
1037
|
+
"responseData": {
|
|
1038
|
+
"name": "morpheus",
|
|
1039
|
+
"job": "leader"
|
|
1040
|
+
},
|
|
1041
|
+
"statusCodes": [
|
|
1042
|
+
200,
|
|
1043
|
+
201
|
|
1044
|
+
],
|
|
1045
|
+
"savePath": "response.json",
|
|
1046
|
+
"saveDirectory": "media",
|
|
1047
|
+
"maxVariation": 5,
|
|
1048
|
+
"overwrite": "byVariation"
|
|
961
1049
|
}
|
|
962
1050
|
]
|
|
963
1051
|
},
|
|
@@ -1013,6 +1101,31 @@
|
|
|
1013
1101
|
"type": "string",
|
|
1014
1102
|
"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.*/`."
|
|
1015
1103
|
},
|
|
1104
|
+
"savePath": {
|
|
1105
|
+
"type": "string",
|
|
1106
|
+
"description": "File path to save the command's output, relative to `saveDirectory`."
|
|
1107
|
+
},
|
|
1108
|
+
"saveDirectory": {
|
|
1109
|
+
"type": "string",
|
|
1110
|
+
"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."
|
|
1111
|
+
},
|
|
1112
|
+
"maxVariation": {
|
|
1113
|
+
"type": "integer",
|
|
1114
|
+
"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.",
|
|
1115
|
+
"default": 0,
|
|
1116
|
+
"minimum": 0,
|
|
1117
|
+
"maximum": 100
|
|
1118
|
+
},
|
|
1119
|
+
"overwrite": {
|
|
1120
|
+
"type": "string",
|
|
1121
|
+
"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`.",
|
|
1122
|
+
"enum": [
|
|
1123
|
+
"true",
|
|
1124
|
+
"false",
|
|
1125
|
+
"byVariation"
|
|
1126
|
+
],
|
|
1127
|
+
"default": "false"
|
|
1128
|
+
},
|
|
1016
1129
|
"timeout": {
|
|
1017
1130
|
"type": "integer",
|
|
1018
1131
|
"description": "Max time in milliseconds the command is allowed to run. If the command runs longer than this, the step fails.",
|
|
@@ -1103,6 +1216,18 @@
|
|
|
1103
1216
|
"regex": ".*"
|
|
1104
1217
|
}
|
|
1105
1218
|
]
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
"action": "runShell",
|
|
1222
|
+
"command": "docker run hello-world",
|
|
1223
|
+
"exitCodes": [
|
|
1224
|
+
0
|
|
1225
|
+
],
|
|
1226
|
+
"output": "Hello from Docker!",
|
|
1227
|
+
"savePath": "docker-output.txt",
|
|
1228
|
+
"saveDirectory": "output",
|
|
1229
|
+
"maxVariation": 10,
|
|
1230
|
+
"overwrite": "byVariation"
|
|
1106
1231
|
}
|
|
1107
1232
|
]
|
|
1108
1233
|
},
|
|
@@ -1126,16 +1251,17 @@
|
|
|
1126
1251
|
},
|
|
1127
1252
|
"path": {
|
|
1128
1253
|
"type": "string",
|
|
1129
|
-
"description": "
|
|
1254
|
+
"description": "File path of the PNG file, relative to `directory`. If not specified, the file name is the ID of the step.",
|
|
1130
1255
|
"pattern": "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)"
|
|
1131
1256
|
},
|
|
1132
1257
|
"directory": {
|
|
1133
1258
|
"type": "string",
|
|
1134
|
-
"description": "Directory of the PNG file.
|
|
1259
|
+
"description": "Directory of the PNG file. If the directory doesn't exist, creates the directory. If not specified, the directory is your media directory."
|
|
1135
1260
|
},
|
|
1136
1261
|
"maxVariation": {
|
|
1137
1262
|
"type": "number",
|
|
1138
1263
|
"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.",
|
|
1264
|
+
"default": 5,
|
|
1139
1265
|
"minimum": 0,
|
|
1140
1266
|
"maximum": 100
|
|
1141
1267
|
},
|
|
@@ -1147,7 +1273,7 @@
|
|
|
1147
1273
|
"false",
|
|
1148
1274
|
"byVariation"
|
|
1149
1275
|
],
|
|
1150
|
-
"default": false
|
|
1276
|
+
"default": "false"
|
|
1151
1277
|
}
|
|
1152
1278
|
},
|
|
1153
1279
|
"dynamicDefaults": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"matchText": {
|
|
29
29
|
"type": "string",
|
|
30
|
-
"description": "Text that the element should contain. If the element doesn't contain the text, the step fails."
|
|
30
|
+
"description": "Text that the element should contain. If the element doesn't contain the text, the step fails. Accepts both strings an regular expressions. To use a regular expression, the expression should start and end with a `/`. For example, `/search/`."
|
|
31
31
|
},
|
|
32
32
|
"moveTo": {
|
|
33
33
|
"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.",
|
|
@@ -79,6 +79,33 @@
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
]
|
|
82
|
+
},
|
|
83
|
+
"setVariables": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"description": "Extract environment variables from the element's text.",
|
|
86
|
+
"items": {
|
|
87
|
+
"oneOf": [
|
|
88
|
+
{
|
|
89
|
+
"description": "",
|
|
90
|
+
"type": "object",
|
|
91
|
+
"properties": {
|
|
92
|
+
"name": {
|
|
93
|
+
"description": "Name of the environment variable to set.",
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"regex": {
|
|
97
|
+
"description": "Regex to extract the environment variable from the element's text.",
|
|
98
|
+
"type": "string"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"required": [
|
|
102
|
+
"name",
|
|
103
|
+
"regex"
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"default": []
|
|
82
109
|
}
|
|
83
110
|
},
|
|
84
111
|
"required": [
|
|
@@ -116,6 +143,16 @@
|
|
|
116
143
|
],
|
|
117
144
|
"delay": 100
|
|
118
145
|
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"action": "find",
|
|
149
|
+
"selector": "[title=ResultsCount]",
|
|
150
|
+
"setVariables": [
|
|
151
|
+
{
|
|
152
|
+
"name": "resultsCount",
|
|
153
|
+
"regex": ".*"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
119
156
|
}
|
|
120
157
|
]
|
|
121
158
|
}
|
|
@@ -101,6 +101,36 @@
|
|
|
101
101
|
"default": {},
|
|
102
102
|
"properties": {}
|
|
103
103
|
},
|
|
104
|
+
"allowAdditionalFields": {
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"description": "If `false`, the step fails when the response data contains fields not specified in `responseData`.",
|
|
107
|
+
"default": true
|
|
108
|
+
},
|
|
109
|
+
"savePath": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"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."
|
|
112
|
+
},
|
|
113
|
+
"saveDirectory": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"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."
|
|
116
|
+
},
|
|
117
|
+
"maxVariation": {
|
|
118
|
+
"type": "integer",
|
|
119
|
+
"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.",
|
|
120
|
+
"default": 0,
|
|
121
|
+
"minimum": 0,
|
|
122
|
+
"maximum": 100
|
|
123
|
+
},
|
|
124
|
+
"overwrite": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"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`.",
|
|
127
|
+
"enum": [
|
|
128
|
+
"true",
|
|
129
|
+
"false",
|
|
130
|
+
"byVariation"
|
|
131
|
+
],
|
|
132
|
+
"default": "false"
|
|
133
|
+
},
|
|
104
134
|
"envsFromResponseData": {
|
|
105
135
|
"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.",
|
|
106
136
|
"type": "array",
|
|
@@ -191,6 +221,27 @@
|
|
|
191
221
|
"statusCodes": [
|
|
192
222
|
200
|
|
193
223
|
]
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"action": "httpRequest",
|
|
227
|
+
"url": "https://reqres.in/api/users",
|
|
228
|
+
"method": "post",
|
|
229
|
+
"requestData": {
|
|
230
|
+
"name": "morpheus",
|
|
231
|
+
"job": "leader"
|
|
232
|
+
},
|
|
233
|
+
"responseData": {
|
|
234
|
+
"name": "morpheus",
|
|
235
|
+
"job": "leader"
|
|
236
|
+
},
|
|
237
|
+
"statusCodes": [
|
|
238
|
+
200,
|
|
239
|
+
201
|
|
240
|
+
],
|
|
241
|
+
"savePath": "response.json",
|
|
242
|
+
"saveDirectory": "media",
|
|
243
|
+
"maxVariation": 5,
|
|
244
|
+
"overwrite": "byVariation"
|
|
194
245
|
}
|
|
195
246
|
]
|
|
196
247
|
}
|
|
@@ -50,6 +50,31 @@
|
|
|
50
50
|
"type": "string",
|
|
51
51
|
"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.*/`."
|
|
52
52
|
},
|
|
53
|
+
"savePath": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "File path to save the command's output, relative to `saveDirectory`."
|
|
56
|
+
},
|
|
57
|
+
"saveDirectory": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"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."
|
|
60
|
+
},
|
|
61
|
+
"maxVariation": {
|
|
62
|
+
"type": "integer",
|
|
63
|
+
"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.",
|
|
64
|
+
"default": 0,
|
|
65
|
+
"minimum": 0,
|
|
66
|
+
"maximum": 100
|
|
67
|
+
},
|
|
68
|
+
"overwrite": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"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`.",
|
|
71
|
+
"enum": [
|
|
72
|
+
"true",
|
|
73
|
+
"false",
|
|
74
|
+
"byVariation"
|
|
75
|
+
],
|
|
76
|
+
"default": "false"
|
|
77
|
+
},
|
|
53
78
|
"timeout": {
|
|
54
79
|
"type": "integer",
|
|
55
80
|
"description": "Max time in milliseconds the command is allowed to run. If the command runs longer than this, the step fails.",
|
|
@@ -140,6 +165,18 @@
|
|
|
140
165
|
"regex": ".*"
|
|
141
166
|
}
|
|
142
167
|
]
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"action": "runShell",
|
|
171
|
+
"command": "docker run hello-world",
|
|
172
|
+
"exitCodes": [
|
|
173
|
+
0
|
|
174
|
+
],
|
|
175
|
+
"output": "Hello from Docker!",
|
|
176
|
+
"savePath": "docker-output.txt",
|
|
177
|
+
"saveDirectory": "output",
|
|
178
|
+
"maxVariation": 10,
|
|
179
|
+
"overwrite": "byVariation"
|
|
143
180
|
}
|
|
144
181
|
]
|
|
145
182
|
}
|
|
@@ -18,16 +18,17 @@
|
|
|
18
18
|
},
|
|
19
19
|
"path": {
|
|
20
20
|
"type": "string",
|
|
21
|
-
"description": "
|
|
21
|
+
"description": "File path of the PNG file, relative to `directory`. If not specified, the file name is the ID of the step.",
|
|
22
22
|
"pattern": "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)"
|
|
23
23
|
},
|
|
24
24
|
"directory": {
|
|
25
25
|
"type": "string",
|
|
26
|
-
"description": "Directory of the PNG file.
|
|
26
|
+
"description": "Directory of the PNG file. If the directory doesn't exist, creates the directory. If not specified, the directory is your media directory."
|
|
27
27
|
},
|
|
28
28
|
"maxVariation": {
|
|
29
29
|
"type": "number",
|
|
30
30
|
"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.",
|
|
31
|
+
"default": 5,
|
|
31
32
|
"minimum": 0,
|
|
32
33
|
"maximum": 100
|
|
33
34
|
},
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
"false",
|
|
40
41
|
"byVariation"
|
|
41
42
|
],
|
|
42
|
-
"default": false
|
|
43
|
+
"default": "false"
|
|
43
44
|
}
|
|
44
45
|
},
|
|
45
46
|
"dynamicDefaults": {
|
|
@@ -544,6 +544,36 @@
|
|
|
544
544
|
"default": {},
|
|
545
545
|
"properties": {}
|
|
546
546
|
},
|
|
547
|
+
"allowAdditionalFields": {
|
|
548
|
+
"type": "boolean",
|
|
549
|
+
"description": "If `false`, the step fails when the response data contains fields not specified in `responseData`.",
|
|
550
|
+
"default": true
|
|
551
|
+
},
|
|
552
|
+
"savePath": {
|
|
553
|
+
"type": "string",
|
|
554
|
+
"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."
|
|
555
|
+
},
|
|
556
|
+
"saveDirectory": {
|
|
557
|
+
"type": "string",
|
|
558
|
+
"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."
|
|
559
|
+
},
|
|
560
|
+
"maxVariation": {
|
|
561
|
+
"type": "integer",
|
|
562
|
+
"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.",
|
|
563
|
+
"default": 0,
|
|
564
|
+
"minimum": 0,
|
|
565
|
+
"maximum": 100
|
|
566
|
+
},
|
|
567
|
+
"overwrite": {
|
|
568
|
+
"type": "string",
|
|
569
|
+
"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`.",
|
|
570
|
+
"enum": [
|
|
571
|
+
"true",
|
|
572
|
+
"false",
|
|
573
|
+
"byVariation"
|
|
574
|
+
],
|
|
575
|
+
"default": "false"
|
|
576
|
+
},
|
|
547
577
|
"envsFromResponseData": {
|
|
548
578
|
"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.",
|
|
549
579
|
"type": "array",
|
|
@@ -634,6 +664,27 @@
|
|
|
634
664
|
"statusCodes": [
|
|
635
665
|
200
|
|
636
666
|
]
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"action": "httpRequest",
|
|
670
|
+
"url": "https://reqres.in/api/users",
|
|
671
|
+
"method": "post",
|
|
672
|
+
"requestData": {
|
|
673
|
+
"name": "morpheus",
|
|
674
|
+
"job": "leader"
|
|
675
|
+
},
|
|
676
|
+
"responseData": {
|
|
677
|
+
"name": "morpheus",
|
|
678
|
+
"job": "leader"
|
|
679
|
+
},
|
|
680
|
+
"statusCodes": [
|
|
681
|
+
200,
|
|
682
|
+
201
|
|
683
|
+
],
|
|
684
|
+
"savePath": "response.json",
|
|
685
|
+
"saveDirectory": "media",
|
|
686
|
+
"maxVariation": 5,
|
|
687
|
+
"overwrite": "byVariation"
|
|
637
688
|
}
|
|
638
689
|
]
|
|
639
690
|
},
|
|
@@ -689,6 +740,31 @@
|
|
|
689
740
|
"type": "string",
|
|
690
741
|
"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.*/`."
|
|
691
742
|
},
|
|
743
|
+
"savePath": {
|
|
744
|
+
"type": "string",
|
|
745
|
+
"description": "File path to save the command's output, relative to `saveDirectory`."
|
|
746
|
+
},
|
|
747
|
+
"saveDirectory": {
|
|
748
|
+
"type": "string",
|
|
749
|
+
"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."
|
|
750
|
+
},
|
|
751
|
+
"maxVariation": {
|
|
752
|
+
"type": "integer",
|
|
753
|
+
"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.",
|
|
754
|
+
"default": 0,
|
|
755
|
+
"minimum": 0,
|
|
756
|
+
"maximum": 100
|
|
757
|
+
},
|
|
758
|
+
"overwrite": {
|
|
759
|
+
"type": "string",
|
|
760
|
+
"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`.",
|
|
761
|
+
"enum": [
|
|
762
|
+
"true",
|
|
763
|
+
"false",
|
|
764
|
+
"byVariation"
|
|
765
|
+
],
|
|
766
|
+
"default": "false"
|
|
767
|
+
},
|
|
692
768
|
"timeout": {
|
|
693
769
|
"type": "integer",
|
|
694
770
|
"description": "Max time in milliseconds the command is allowed to run. If the command runs longer than this, the step fails.",
|
|
@@ -779,6 +855,18 @@
|
|
|
779
855
|
"regex": ".*"
|
|
780
856
|
}
|
|
781
857
|
]
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
"action": "runShell",
|
|
861
|
+
"command": "docker run hello-world",
|
|
862
|
+
"exitCodes": [
|
|
863
|
+
0
|
|
864
|
+
],
|
|
865
|
+
"output": "Hello from Docker!",
|
|
866
|
+
"savePath": "docker-output.txt",
|
|
867
|
+
"saveDirectory": "output",
|
|
868
|
+
"maxVariation": 10,
|
|
869
|
+
"overwrite": "byVariation"
|
|
782
870
|
}
|
|
783
871
|
]
|
|
784
872
|
},
|
|
@@ -802,16 +890,17 @@
|
|
|
802
890
|
},
|
|
803
891
|
"path": {
|
|
804
892
|
"type": "string",
|
|
805
|
-
"description": "
|
|
893
|
+
"description": "File path of the PNG file, relative to `directory`. If not specified, the file name is the ID of the step.",
|
|
806
894
|
"pattern": "([A-Za-z0-9_-]*\\.(png|PNG)$|\\$[A-Za-z0-9_]+)"
|
|
807
895
|
},
|
|
808
896
|
"directory": {
|
|
809
897
|
"type": "string",
|
|
810
|
-
"description": "Directory of the PNG file.
|
|
898
|
+
"description": "Directory of the PNG file. If the directory doesn't exist, creates the directory. If not specified, the directory is your media directory."
|
|
811
899
|
},
|
|
812
900
|
"maxVariation": {
|
|
813
901
|
"type": "number",
|
|
814
902
|
"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.",
|
|
903
|
+
"default": 5,
|
|
815
904
|
"minimum": 0,
|
|
816
905
|
"maximum": 100
|
|
817
906
|
},
|
|
@@ -823,7 +912,7 @@
|
|
|
823
912
|
"false",
|
|
824
913
|
"byVariation"
|
|
825
914
|
],
|
|
826
|
-
"default": false
|
|
915
|
+
"default": "false"
|
|
827
916
|
}
|
|
828
917
|
},
|
|
829
918
|
"dynamicDefaults": {
|
|
@@ -1081,7 +1170,7 @@
|
|
|
1081
1170
|
},
|
|
1082
1171
|
"matchText": {
|
|
1083
1172
|
"type": "string",
|
|
1084
|
-
"description": "Text that the element should contain. If the element doesn't contain the text, the step fails."
|
|
1173
|
+
"description": "Text that the element should contain. If the element doesn't contain the text, the step fails. Accepts both strings an regular expressions. To use a regular expression, the expression should start and end with a `/`. For example, `/search/`."
|
|
1085
1174
|
},
|
|
1086
1175
|
"moveTo": {
|
|
1087
1176
|
"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.",
|
|
@@ -1133,6 +1222,33 @@
|
|
|
1133
1222
|
}
|
|
1134
1223
|
}
|
|
1135
1224
|
]
|
|
1225
|
+
},
|
|
1226
|
+
"setVariables": {
|
|
1227
|
+
"type": "array",
|
|
1228
|
+
"description": "Extract environment variables from the element's text.",
|
|
1229
|
+
"items": {
|
|
1230
|
+
"oneOf": [
|
|
1231
|
+
{
|
|
1232
|
+
"description": "",
|
|
1233
|
+
"type": "object",
|
|
1234
|
+
"properties": {
|
|
1235
|
+
"name": {
|
|
1236
|
+
"description": "Name of the environment variable to set.",
|
|
1237
|
+
"type": "string"
|
|
1238
|
+
},
|
|
1239
|
+
"regex": {
|
|
1240
|
+
"description": "Regex to extract the environment variable from the element's text.",
|
|
1241
|
+
"type": "string"
|
|
1242
|
+
}
|
|
1243
|
+
},
|
|
1244
|
+
"required": [
|
|
1245
|
+
"name",
|
|
1246
|
+
"regex"
|
|
1247
|
+
]
|
|
1248
|
+
}
|
|
1249
|
+
]
|
|
1250
|
+
},
|
|
1251
|
+
"default": []
|
|
1136
1252
|
}
|
|
1137
1253
|
},
|
|
1138
1254
|
"required": [
|
|
@@ -1170,6 +1286,16 @@
|
|
|
1170
1286
|
],
|
|
1171
1287
|
"delay": 100
|
|
1172
1288
|
}
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
"action": "find",
|
|
1292
|
+
"selector": "[title=ResultsCount]",
|
|
1293
|
+
"setVariables": [
|
|
1294
|
+
{
|
|
1295
|
+
"name": "resultsCount",
|
|
1296
|
+
"regex": ".*"
|
|
1297
|
+
}
|
|
1298
|
+
]
|
|
1173
1299
|
}
|
|
1174
1300
|
]
|
|
1175
1301
|
},
|