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.
- package/package.json +1 -1
- package/.c8rc.json +0 -8
- package/.mocharc.yml +0 -1
- package/icon.png +0 -0
- package/scripts/check-coverage-ratchet.cjs +0 -123
- package/scripts/createCjsWrapper.js +0 -25
- package/scripts/generateTypes.cjs +0 -54
- package/src/detectTests.ts +0 -660
- package/src/index.ts +0 -3
- package/src/schemas/build/checkLink_v2.schema.json +0 -81
- package/src/schemas/build/checkLink_v3.schema.json +0 -92
- package/src/schemas/build/click_v3.schema.json +0 -145
- package/src/schemas/build/config_v2.schema.json +0 -1079
- package/src/schemas/build/config_v3.schema.json +0 -696
- package/src/schemas/build/context_v2.schema.json +0 -135
- package/src/schemas/build/context_v3.schema.json +0 -229
- package/src/schemas/build/dragAndDrop_v3.schema.json +0 -189
- package/src/schemas/build/find_v2.schema.json +0 -168
- package/src/schemas/build/find_v3.schema.json +0 -214
- package/src/schemas/build/goTo_v2.schema.json +0 -63
- package/src/schemas/build/goTo_v3.schema.json +0 -257
- package/src/schemas/build/httpRequest_v2.schema.json +0 -321
- package/src/schemas/build/httpRequest_v3.schema.json +0 -439
- package/src/schemas/build/loadCookie_v3.schema.json +0 -138
- package/src/schemas/build/loadVariables_v3.schema.json +0 -10
- package/src/schemas/build/moveTo_v2.schema.json +0 -99
- package/src/schemas/build/openApi_v2.schema.json +0 -76
- package/src/schemas/build/openApi_v3.schema.json +0 -161
- package/src/schemas/build/record_v3.schema.json +0 -70
- package/src/schemas/build/report_v3.schema.json +0 -53
- package/src/schemas/build/resolvedTests_v3.schema.json +0 -238
- package/src/schemas/build/runCode_v2.schema.json +0 -201
- package/src/schemas/build/runCode_v3.schema.json +0 -138
- package/src/schemas/build/runShell_v2.schema.json +0 -189
- package/src/schemas/build/runShell_v3.schema.json +0 -156
- package/src/schemas/build/saveCookie_v3.schema.json +0 -149
- package/src/schemas/build/saveScreenshot_v2.schema.json +0 -150
- package/src/schemas/build/screenshot_v3.schema.json +0 -250
- package/src/schemas/build/setVariables_v2.schema.json +0 -39
- package/src/schemas/build/sourceIntegration_v3.schema.json +0 -51
- package/src/schemas/build/spec_v2.schema.json +0 -199
- package/src/schemas/build/spec_v3.schema.json +0 -213
- package/src/schemas/build/startRecording_v2.schema.json +0 -57
- package/src/schemas/build/step_v3.schema.json +0 -669
- package/src/schemas/build/stopRecord_v3.schema.json +0 -13
- package/src/schemas/build/stopRecording_v2.schema.json +0 -33
- package/src/schemas/build/test_v2.schema.json +0 -244
- package/src/schemas/build/test_v3.schema.json +0 -292
- package/src/schemas/build/typeKeys_v2.schema.json +0 -72
- package/src/schemas/build/type_v3.schema.json +0 -131
- package/src/schemas/build/wait_v2.schema.json +0 -42
- package/src/schemas/build/wait_v3.schema.json +0 -37
- package/src/schemas/dereferenceSchemas.cjs +0 -208
- package/src/schemas/index.ts +0 -6
- package/src/schemas/output_schemas/analytics_v1.schema.json +0 -585
- package/src/schemas/output_schemas/checkLink_v1.schema.json +0 -42
- package/src/schemas/output_schemas/checkLink_v2.schema.json +0 -80
- package/src/schemas/output_schemas/checkLink_v3.schema.json +0 -145
- package/src/schemas/output_schemas/click_v1.schema.json +0 -60
- package/src/schemas/output_schemas/click_v3.schema.json +0 -252
- package/src/schemas/output_schemas/config_v2.schema.json +0 -2628
- package/src/schemas/output_schemas/config_v3.schema.json +0 -16470
- package/src/schemas/output_schemas/context_v2.schema.json +0 -134
- package/src/schemas/output_schemas/context_v3.schema.json +0 -374
- package/src/schemas/output_schemas/dragAndDrop_v3.schema.json +0 -496
- package/src/schemas/output_schemas/endRecord_v3.schema.json +0 -12
- package/src/schemas/output_schemas/find_v1.schema.json +0 -171
- package/src/schemas/output_schemas/find_v2.schema.json +0 -184
- package/src/schemas/output_schemas/find_v3.schema.json +0 -1349
- package/src/schemas/output_schemas/goTo_v1.schema.json +0 -30
- package/src/schemas/output_schemas/goTo_v2.schema.json +0 -62
- package/src/schemas/output_schemas/goTo_v3.schema.json +0 -419
- package/src/schemas/output_schemas/httpRequest_v1.schema.json +0 -115
- package/src/schemas/output_schemas/httpRequest_v2.schema.json +0 -392
- package/src/schemas/output_schemas/httpRequest_v3.schema.json +0 -994
- package/src/schemas/output_schemas/loadCookie_v3.schema.json +0 -228
- package/src/schemas/output_schemas/loadVariables_v3.schema.json +0 -9
- package/src/schemas/output_schemas/matchText_v1.schema.json +0 -32
- package/src/schemas/output_schemas/moveMouse_v1.schema.json +0 -60
- package/src/schemas/output_schemas/moveTo_v2.schema.json +0 -98
- package/src/schemas/output_schemas/openApi_v2.schema.json +0 -75
- package/src/schemas/output_schemas/openApi_v3.schema.json +0 -162
- package/src/schemas/output_schemas/record_v3.schema.json +0 -101
- package/src/schemas/output_schemas/report_v3.schema.json +0 -16826
- package/src/schemas/output_schemas/resolvedTests_v3.schema.json +0 -33331
- package/src/schemas/output_schemas/runCode_v2.schema.json +0 -200
- package/src/schemas/output_schemas/runCode_v3.schema.json +0 -222
- package/src/schemas/output_schemas/runShell_v1.schema.json +0 -35
- package/src/schemas/output_schemas/runShell_v2.schema.json +0 -188
- package/src/schemas/output_schemas/runShell_v3.schema.json +0 -236
- package/src/schemas/output_schemas/saveCookie_v3.schema.json +0 -245
- package/src/schemas/output_schemas/saveScreenshot_v2.schema.json +0 -149
- package/src/schemas/output_schemas/screenshot_v1.schema.json +0 -48
- package/src/schemas/output_schemas/screenshot_v3.schema.json +0 -681
- package/src/schemas/output_schemas/scroll_v1.schema.json +0 -50
- package/src/schemas/output_schemas/setVariables_v2.schema.json +0 -38
- package/src/schemas/output_schemas/sourceIntegration_v3.schema.json +0 -50
- package/src/schemas/output_schemas/spec_v2.schema.json +0 -2301
- package/src/schemas/output_schemas/spec_v3.schema.json +0 -16630
- package/src/schemas/output_schemas/startRecording_v1.schema.json +0 -55
- package/src/schemas/output_schemas/startRecording_v2.schema.json +0 -56
- package/src/schemas/output_schemas/step_v3.schema.json +0 -7317
- package/src/schemas/output_schemas/stopRecord_v3.schema.json +0 -12
- package/src/schemas/output_schemas/stopRecording_v1.schema.json +0 -20
- package/src/schemas/output_schemas/stopRecording_v2.schema.json +0 -32
- package/src/schemas/output_schemas/test_v2.schema.json +0 -1903
- package/src/schemas/output_schemas/test_v3.schema.json +0 -15863
- package/src/schemas/output_schemas/typeKeys_v2.schema.json +0 -71
- package/src/schemas/output_schemas/type_v1.schema.json +0 -62
- package/src/schemas/output_schemas/type_v3.schema.json +0 -244
- package/src/schemas/output_schemas/wait_v1.schema.json +0 -42
- package/src/schemas/output_schemas/wait_v2.schema.json +0 -41
- package/src/schemas/output_schemas/wait_v3.schema.json +0 -41
- package/src/schemas/schemas.json +0 -121331
- package/src/schemas/src_schemas/analytics_v1.schema.json +0 -585
- package/src/schemas/src_schemas/checkLink_v1.schema.json +0 -42
- package/src/schemas/src_schemas/checkLink_v2.schema.json +0 -65
- package/src/schemas/src_schemas/checkLink_v3.schema.json +0 -91
- package/src/schemas/src_schemas/click_v1.schema.json +0 -60
- package/src/schemas/src_schemas/click_v3.schema.json +0 -144
- package/src/schemas/src_schemas/config_v2.schema.json +0 -929
- package/src/schemas/src_schemas/config_v3.schema.json +0 -633
- package/src/schemas/src_schemas/context_v2.schema.json +0 -108
- package/src/schemas/src_schemas/context_v3.schema.json +0 -202
- package/src/schemas/src_schemas/dragAndDrop_v3.schema.json +0 -185
- package/src/schemas/src_schemas/find_v1.schema.json +0 -137
- package/src/schemas/src_schemas/find_v2.schema.json +0 -155
- package/src/schemas/src_schemas/find_v3.schema.json +0 -210
- package/src/schemas/src_schemas/goTo_v1.schema.json +0 -30
- package/src/schemas/src_schemas/goTo_v2.schema.json +0 -58
- package/src/schemas/src_schemas/goTo_v3.schema.json +0 -232
- package/src/schemas/src_schemas/httpRequest_v1.schema.json +0 -115
- package/src/schemas/src_schemas/httpRequest_v2.schema.json +0 -284
- package/src/schemas/src_schemas/httpRequest_v3.schema.json +0 -402
- package/src/schemas/src_schemas/loadCookie_v3.schema.json +0 -113
- package/src/schemas/src_schemas/loadVariables_v3.schema.json +0 -9
- package/src/schemas/src_schemas/matchText_v1.schema.json +0 -32
- package/src/schemas/src_schemas/moveMouse_v1.schema.json +0 -60
- package/src/schemas/src_schemas/moveTo_v2.schema.json +0 -89
- package/src/schemas/src_schemas/openApi_v2.schema.json +0 -64
- package/src/schemas/src_schemas/openApi_v3.schema.json +0 -161
- package/src/schemas/src_schemas/record_v3.schema.json +0 -69
- package/src/schemas/src_schemas/report_v3.schema.json +0 -52
- package/src/schemas/src_schemas/resolvedTests_v3.schema.json +0 -237
- package/src/schemas/src_schemas/runCode_v2.schema.json +0 -181
- package/src/schemas/src_schemas/runCode_v3.schema.json +0 -137
- package/src/schemas/src_schemas/runShell_v1.schema.json +0 -35
- package/src/schemas/src_schemas/runShell_v2.schema.json +0 -166
- package/src/schemas/src_schemas/runShell_v3.schema.json +0 -155
- package/src/schemas/src_schemas/saveCookie_v3.schema.json +0 -124
- package/src/schemas/src_schemas/saveScreenshot_v2.schema.json +0 -129
- package/src/schemas/src_schemas/screenshot_v1.schema.json +0 -48
- package/src/schemas/src_schemas/screenshot_v3.schema.json +0 -249
- package/src/schemas/src_schemas/scroll_v1.schema.json +0 -50
- package/src/schemas/src_schemas/setVariables_v2.schema.json +0 -38
- package/src/schemas/src_schemas/sourceIntegration_v3.schema.json +0 -45
- package/src/schemas/src_schemas/spec_v2.schema.json +0 -175
- package/src/schemas/src_schemas/spec_v3.schema.json +0 -212
- package/src/schemas/src_schemas/startRecording_v1.schema.json +0 -55
- package/src/schemas/src_schemas/startRecording_v2.schema.json +0 -54
- package/src/schemas/src_schemas/step_v3.schema.json +0 -632
- package/src/schemas/src_schemas/stopRecord_v3.schema.json +0 -9
- package/src/schemas/src_schemas/stopRecording_v1.schema.json +0 -20
- package/src/schemas/src_schemas/stopRecording_v2.schema.json +0 -32
- package/src/schemas/src_schemas/test_v2.schema.json +0 -200
- package/src/schemas/src_schemas/test_v3.schema.json +0 -268
- package/src/schemas/src_schemas/typeKeys_v2.schema.json +0 -63
- package/src/schemas/src_schemas/type_v1.schema.json +0 -62
- package/src/schemas/src_schemas/type_v3.schema.json +0 -118
- package/src/schemas/src_schemas/wait_v1.schema.json +0 -42
- package/src/schemas/src_schemas/wait_v2.schema.json +0 -41
- package/src/schemas/src_schemas/wait_v3.schema.json +0 -36
- package/src/types/generated/checkLink_v3.ts +0 -29
- package/src/types/generated/click_v3.ts +0 -17
- package/src/types/generated/config_v3.ts +0 -405
- package/src/types/generated/context_v3.ts +0 -112
- package/src/types/generated/dragAndDrop_v3.ts +0 -39
- package/src/types/generated/endRecord_v3.ts +0 -10
- package/src/types/generated/find_v3.ts +0 -17
- package/src/types/generated/goTo_v3.ts +0 -48
- package/src/types/generated/httpRequest_v3.ts +0 -17
- package/src/types/generated/loadCookie_v3.ts +0 -17
- package/src/types/generated/loadVariables_v3.ts +0 -10
- package/src/types/generated/openApi_v3.ts +0 -64
- package/src/types/generated/record_v3.ts +0 -34
- package/src/types/generated/report_v3.ts +0 -183
- package/src/types/generated/resolvedTests_v3.ts +0 -585
- package/src/types/generated/runCode_v3.ts +0 -59
- package/src/types/generated/runShell_v3.ts +0 -58
- package/src/types/generated/saveCookie_v3.ts +0 -17
- package/src/types/generated/screenshot_v3.ts +0 -76
- package/src/types/generated/sourceIntegration_v3.ts +0 -31
- package/src/types/generated/spec_v3.ts +0 -166
- package/src/types/generated/step_v3.ts +0 -1288
- package/src/types/generated/stopRecord_v3.ts +0 -10
- package/src/types/generated/test_v3.ts +0 -3048
- package/src/types/generated/type_v3.ts +0 -56
- package/src/types/generated/wait_v3.ts +0 -13
- package/src/validate.ts +0 -627
- package/tsconfig.json +0 -22
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "test",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"description": "A Doc Detective test.",
|
|
5
|
-
"properties": {
|
|
6
|
-
"id": {
|
|
7
|
-
"type": "string",
|
|
8
|
-
"description": "Unique identifier for the test."
|
|
9
|
-
},
|
|
10
|
-
"description": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"description": "Description of the test."
|
|
13
|
-
},
|
|
14
|
-
"file": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "Path to the file that the test is associated with."
|
|
17
|
-
},
|
|
18
|
-
"detectSteps": {
|
|
19
|
-
"type": "boolean",
|
|
20
|
-
"description": "Whether or not to detect steps in input files based on markup regex. Defaults to `true`."
|
|
21
|
-
},
|
|
22
|
-
"contexts": {
|
|
23
|
-
"type": "array",
|
|
24
|
-
"description": "Application/platform sets to run the test in. Overrides `contexts` defined at the config-level and spec-level.",
|
|
25
|
-
"items": {
|
|
26
|
-
"oneOf": [
|
|
27
|
-
{
|
|
28
|
-
"$ref": "context_v2.schema.json#"
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"openApi": {
|
|
34
|
-
"type": "array",
|
|
35
|
-
"items": {
|
|
36
|
-
"allOf": [
|
|
37
|
-
{
|
|
38
|
-
"$ref": "openApi_v2.schema.json#"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"type": "object",
|
|
42
|
-
"properties": {
|
|
43
|
-
"operationId": {
|
|
44
|
-
"type": "null",
|
|
45
|
-
"$commment": "Only allow operationId at the step level."
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"required": ["name", "descriptionPath"]
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"setup": {
|
|
54
|
-
"type": "string",
|
|
55
|
-
"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."
|
|
56
|
-
},
|
|
57
|
-
"cleanup": {
|
|
58
|
-
"type": "string",
|
|
59
|
-
"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."
|
|
60
|
-
},
|
|
61
|
-
"steps": {
|
|
62
|
-
"description": "Actions to perform as part of the test. Performed in the sequence defined. If one or more actions fail, the test fails.",
|
|
63
|
-
"type": "array",
|
|
64
|
-
"minItems": 1,
|
|
65
|
-
"items": {
|
|
66
|
-
"anyOf": [
|
|
67
|
-
{ "$ref": "checkLink_v2.schema.json#" },
|
|
68
|
-
{ "$ref": "goTo_v2.schema.json#" },
|
|
69
|
-
{ "$ref": "httpRequest_v2.schema.json#" },
|
|
70
|
-
{ "$ref": "runCode_v2.schema.json#" },
|
|
71
|
-
{ "$ref": "runShell_v2.schema.json#" },
|
|
72
|
-
{ "$ref": "saveScreenshot_v2.schema.json#" },
|
|
73
|
-
{ "$ref": "setVariables_v2.schema.json#" },
|
|
74
|
-
{ "$ref": "startRecording_v2.schema.json#" },
|
|
75
|
-
{ "$ref": "stopRecording_v2.schema.json#" },
|
|
76
|
-
{ "$ref": "typeKeys_v2.schema.json#" },
|
|
77
|
-
{ "$ref": "find_v2.schema.json#" },
|
|
78
|
-
{ "$ref": "wait_v2.schema.json#" }
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"dynamicDefaults": {
|
|
84
|
-
"id": "uuid"
|
|
85
|
-
},
|
|
86
|
-
"required": ["steps"],
|
|
87
|
-
"additionalProperties": false,
|
|
88
|
-
"examples": [
|
|
89
|
-
{
|
|
90
|
-
"steps": [
|
|
91
|
-
{
|
|
92
|
-
"action": "checkLink",
|
|
93
|
-
"url": "https://www.duckduckgo.com"
|
|
94
|
-
}
|
|
95
|
-
]
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"steps": [
|
|
99
|
-
{
|
|
100
|
-
"action": "goTo",
|
|
101
|
-
"url": "https://www.duckduckgo.com"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"action": "find",
|
|
105
|
-
"selector": "[title=Search]",
|
|
106
|
-
"click": true,
|
|
107
|
-
"typeKeys": {
|
|
108
|
-
"keys": ["shorthair cats", "$ENTER$"]
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"id": "Do all the things! - Test",
|
|
115
|
-
"description": "This test includes every property across all actions.",
|
|
116
|
-
"contexts": [
|
|
117
|
-
{
|
|
118
|
-
"app": {
|
|
119
|
-
"name": "firefox",
|
|
120
|
-
"path": "/usr/bin/firefox"
|
|
121
|
-
},
|
|
122
|
-
"platforms": ["linux"]
|
|
123
|
-
}
|
|
124
|
-
],
|
|
125
|
-
"setup": "setup.json",
|
|
126
|
-
"cleanup": "cleanup.json",
|
|
127
|
-
"steps": [
|
|
128
|
-
{
|
|
129
|
-
"action": "setVariables",
|
|
130
|
-
"path": ".env"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"action": "runShell",
|
|
134
|
-
"command": "echo",
|
|
135
|
-
"args": ["$USER"]
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"action": "checkLink",
|
|
139
|
-
"url": "https://www.duckduckgo.com"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"action": "httpRequest",
|
|
143
|
-
"url": "https://reqres.in/api/users",
|
|
144
|
-
"method": "post",
|
|
145
|
-
"requestData": {
|
|
146
|
-
"name": "morpheus",
|
|
147
|
-
"job": "leader"
|
|
148
|
-
},
|
|
149
|
-
"responseData": {
|
|
150
|
-
"name": "morpheus",
|
|
151
|
-
"job": "leader"
|
|
152
|
-
},
|
|
153
|
-
"statusCodes": [200, 201]
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"action": "goTo",
|
|
157
|
-
"url": "https://www.duckduckgo.com"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"action": "find",
|
|
161
|
-
"selector": "[title=Search]",
|
|
162
|
-
"timeout": 10000,
|
|
163
|
-
"matchText": "Search",
|
|
164
|
-
"moveTo": true,
|
|
165
|
-
"click": true,
|
|
166
|
-
"typeKeys": {
|
|
167
|
-
"keys": ["shorthair cat"]
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"action": "typeKeys",
|
|
172
|
-
"keys": ["$ENTER$"]
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"action": "saveScreenshot"
|
|
176
|
-
}
|
|
177
|
-
]
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"openApi": [
|
|
181
|
-
{
|
|
182
|
-
"name": "Acme",
|
|
183
|
-
"descriptionPath": "https://www.acme.com/openapi.json",
|
|
184
|
-
"server": "https://api.acme.com"
|
|
185
|
-
}
|
|
186
|
-
],
|
|
187
|
-
"steps": [
|
|
188
|
-
{
|
|
189
|
-
"action": "httpRequest",
|
|
190
|
-
"openApi": {
|
|
191
|
-
"operationId": "getUserById"
|
|
192
|
-
},
|
|
193
|
-
"requestParams": {
|
|
194
|
-
"id": 123
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
]
|
|
198
|
-
}
|
|
199
|
-
]
|
|
200
|
-
}
|
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "test",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"description": "A Doc Detective test.",
|
|
6
|
-
"properties": {
|
|
7
|
-
"testId": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "Unique identifier for the test."
|
|
10
|
-
},
|
|
11
|
-
"description": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"description": "Description of the test."
|
|
14
|
-
},
|
|
15
|
-
"contentPath": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"description": "Path to the content that the test is associated with."
|
|
18
|
-
},
|
|
19
|
-
"detectSteps": {
|
|
20
|
-
"type": "boolean",
|
|
21
|
-
"description": "Whether or not to detect steps in input files based on markup regex.",
|
|
22
|
-
"default": true
|
|
23
|
-
},
|
|
24
|
-
"runOn": {
|
|
25
|
-
"type": "array",
|
|
26
|
-
"description": "Contexts to run the test in. Overrides contexts defined at the config and spec levels.",
|
|
27
|
-
"items": {
|
|
28
|
-
"anyOf": [
|
|
29
|
-
{
|
|
30
|
-
"$ref": "context_v3.schema.json#"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"openApi": {
|
|
36
|
-
"$ref": "#/components/schemas/openApi"
|
|
37
|
-
},
|
|
38
|
-
"before": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"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."
|
|
41
|
-
},
|
|
42
|
-
"after": {
|
|
43
|
-
"type": "string",
|
|
44
|
-
"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."
|
|
45
|
-
},
|
|
46
|
-
"steps": {
|
|
47
|
-
"description": "Steps to perform as part of the test. Performed in the sequence defined. If one or more actions fail, the test fails. By default, if a step fails, the test stops and the remaining steps are not executed.",
|
|
48
|
-
"type": "array",
|
|
49
|
-
"minItems": 1,
|
|
50
|
-
"items": {
|
|
51
|
-
"$ref": "step_v3.schema.json#"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"contexts": {
|
|
55
|
-
"title": "Resolved contexts",
|
|
56
|
-
"type": "array",
|
|
57
|
-
"readOnly": true,
|
|
58
|
-
"description": "Resolved contexts to run the test in. This is a resolved version of the `runOn` property. It is not user-defined and should not be used in test specifications.",
|
|
59
|
-
"items": {
|
|
60
|
-
"type": "object",
|
|
61
|
-
"properties": {
|
|
62
|
-
"platform": {
|
|
63
|
-
"type": "string",
|
|
64
|
-
"description": "Platform to run the test on. This is a resolved version of the `platforms` property."
|
|
65
|
-
},
|
|
66
|
-
"browser": {
|
|
67
|
-
"$ref": "context_v3.schema.json#/components/schemas/browser"
|
|
68
|
-
},
|
|
69
|
-
"openApi": {
|
|
70
|
-
"$ref": "#/components/schemas/openApi"
|
|
71
|
-
},
|
|
72
|
-
"steps": {
|
|
73
|
-
"description": "Steps to perform as part of the test. Performed in the sequence defined. If one or more actions fail, the test fails. By default, if a step fails, the test stops and the remaining steps are not executed.",
|
|
74
|
-
"type": "array",
|
|
75
|
-
"minItems": 1,
|
|
76
|
-
"items": {
|
|
77
|
-
"$ref": "step_v3.schema.json#"
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"title": "Resolved context"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
"dynamicDefaults": {
|
|
86
|
-
"testId": "uuid"
|
|
87
|
-
},
|
|
88
|
-
"anyOf": [
|
|
89
|
-
{
|
|
90
|
-
"required": ["steps"]
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"required": ["contexts"]
|
|
94
|
-
}
|
|
95
|
-
],
|
|
96
|
-
"additionalProperties": false,
|
|
97
|
-
"components": {
|
|
98
|
-
"schemas": {
|
|
99
|
-
"openApi": {
|
|
100
|
-
"type": "array",
|
|
101
|
-
"items": {
|
|
102
|
-
"allOf": [
|
|
103
|
-
{
|
|
104
|
-
"$ref": "openApi_v3.schema.json#"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"type": "object",
|
|
108
|
-
"not": {
|
|
109
|
-
"required": ["operationId"]
|
|
110
|
-
},
|
|
111
|
-
"required": ["name", "descriptionPath"],
|
|
112
|
-
"title": "OpenAPI description (test)"
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
"examples": [
|
|
120
|
-
{
|
|
121
|
-
"steps": [
|
|
122
|
-
{
|
|
123
|
-
"checkLink": "https://www.duckduckgo.com"
|
|
124
|
-
}
|
|
125
|
-
]
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"steps": [
|
|
129
|
-
{
|
|
130
|
-
"goTo": {
|
|
131
|
-
"url": "https://www.duckduckgo.com"
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"find": {
|
|
136
|
-
"selector": "[title=Search]",
|
|
137
|
-
"click": true,
|
|
138
|
-
"type": {
|
|
139
|
-
"keys": ["shorthair cats", "$ENTER$"]
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"testId": "Do all the things! - Test",
|
|
147
|
-
"description": "This test includes every property across all actions.",
|
|
148
|
-
"before": "setup.json",
|
|
149
|
-
"after": "cleanup.json",
|
|
150
|
-
"runOn": [
|
|
151
|
-
{
|
|
152
|
-
"platforms": ["linux"],
|
|
153
|
-
"browsers": {
|
|
154
|
-
"name": "firefox",
|
|
155
|
-
"window": {},
|
|
156
|
-
"viewport": {}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
"steps": [
|
|
161
|
-
{
|
|
162
|
-
"loadVariables": ".env"
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"runShell": {
|
|
166
|
-
"command": "echo",
|
|
167
|
-
"args": ["$USER"],
|
|
168
|
-
"maxVariation": 0,
|
|
169
|
-
"overwrite": "aboveVariation"
|
|
170
|
-
},
|
|
171
|
-
"variables": {}
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"checkLink": {
|
|
175
|
-
"url": "https://www.duckduckgo.com"
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"httpRequest": {
|
|
180
|
-
"method": "post",
|
|
181
|
-
"url": "https://reqres.in/api/users",
|
|
182
|
-
"request": {
|
|
183
|
-
"body": {
|
|
184
|
-
"name": "morpheus",
|
|
185
|
-
"job": "leader"
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
"response": {
|
|
189
|
-
"body": {
|
|
190
|
-
"name": "morpheus",
|
|
191
|
-
"job": "leader"
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
"statusCodes": [200, 201],
|
|
195
|
-
"maxVariation": 0,
|
|
196
|
-
"overwrite": "aboveVariation"
|
|
197
|
-
},
|
|
198
|
-
"variables": {}
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
"goTo": {
|
|
202
|
-
"url": "https://www.duckduckgo.com"
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
"find": {
|
|
207
|
-
"selector": "[title=Search]",
|
|
208
|
-
"elementText": "Search",
|
|
209
|
-
"timeout": 10000,
|
|
210
|
-
"moveTo": true,
|
|
211
|
-
"click": true,
|
|
212
|
-
"type": {
|
|
213
|
-
"keys": ["shorthair cat"]
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
"variables": {}
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
"type": {
|
|
220
|
-
"keys": ["$ENTER$"]
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
"screenshot": {
|
|
225
|
-
"maxVariation": 0,
|
|
226
|
-
"overwrite": "aboveVariation"
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
],
|
|
230
|
-
"detectSteps": true
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
"testId": "c61b02e8-7485-44d3-8065-f873673379c6",
|
|
234
|
-
"openApi": [
|
|
235
|
-
{
|
|
236
|
-
"descriptionPath": "https://www.acme.com/openapi.json",
|
|
237
|
-
"server": "https://api.acme.com",
|
|
238
|
-
"validateAgainstSchema": "both",
|
|
239
|
-
"useExample": "none",
|
|
240
|
-
"exampleKey": "",
|
|
241
|
-
"name": "Acme"
|
|
242
|
-
}
|
|
243
|
-
],
|
|
244
|
-
"steps": [
|
|
245
|
-
{
|
|
246
|
-
"httpRequest": {
|
|
247
|
-
"openApi": {
|
|
248
|
-
"operationId": "getUserById",
|
|
249
|
-
"validateAgainstSchema": "both",
|
|
250
|
-
"useExample": "none",
|
|
251
|
-
"exampleKey": ""
|
|
252
|
-
},
|
|
253
|
-
"request": {
|
|
254
|
-
"parameters": {
|
|
255
|
-
"id": 123
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
"response": {},
|
|
259
|
-
"maxVariation": 0,
|
|
260
|
-
"overwrite": "aboveVariation"
|
|
261
|
-
},
|
|
262
|
-
"variables": {}
|
|
263
|
-
}
|
|
264
|
-
],
|
|
265
|
-
"detectSteps": true
|
|
266
|
-
}
|
|
267
|
-
]
|
|
268
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "typeKeys",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"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$`.",
|
|
5
|
-
"properties": {
|
|
6
|
-
"id": {
|
|
7
|
-
"type": "string",
|
|
8
|
-
"description": "ID of the step."
|
|
9
|
-
},
|
|
10
|
-
"description": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"description": "Description of the step."
|
|
13
|
-
},
|
|
14
|
-
"action": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"const": "typeKeys",
|
|
17
|
-
"description": "The action to perform."
|
|
18
|
-
},
|
|
19
|
-
"keys": {
|
|
20
|
-
"description": "String of keys to enter.",
|
|
21
|
-
"anyOf": [
|
|
22
|
-
{
|
|
23
|
-
"type": "string"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"type": "array",
|
|
27
|
-
"items": {
|
|
28
|
-
"oneOf": [
|
|
29
|
-
{
|
|
30
|
-
"type": "string"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
"delay": {
|
|
38
|
-
"type": "number",
|
|
39
|
-
"description": "Delay in milliseconds between each key press. Only valid during a recording.",
|
|
40
|
-
"default": 100
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"dynamicDefaults": {
|
|
44
|
-
"id": "uuid"
|
|
45
|
-
},
|
|
46
|
-
"required": ["action", "keys"],
|
|
47
|
-
"additionalProperties": false,
|
|
48
|
-
"examples": [
|
|
49
|
-
{
|
|
50
|
-
"action": "typeKeys",
|
|
51
|
-
"keys": "kittens"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"action": "typeKeys",
|
|
55
|
-
"keys": ["$ENTER$"]
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"action": "typeKeys",
|
|
59
|
-
"keys": ["kittens","$ENTER$"],
|
|
60
|
-
"delay": 500
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "type",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"description": "Type keys into an element specified by a CSS selector.",
|
|
5
|
-
"anyOf": [
|
|
6
|
-
{
|
|
7
|
-
"required": [
|
|
8
|
-
"keys"
|
|
9
|
-
]
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"required": [
|
|
13
|
-
"trailingSpecialKey"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
"properties": {
|
|
18
|
-
"action": {
|
|
19
|
-
"type": "string",
|
|
20
|
-
"const": "type"
|
|
21
|
-
},
|
|
22
|
-
"css": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"description": "CSS selector that uniquely identified the element."
|
|
25
|
-
},
|
|
26
|
-
"keys": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"description": "String of keys to enter."
|
|
29
|
-
},
|
|
30
|
-
"trailingSpecialKey": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"description": "Special key pressed after the 'keys' value, if present. Supported values: https://github.com/puppeteer/puppeteer/blob/main/src/common/USKeyboardLayout.ts"
|
|
33
|
-
},
|
|
34
|
-
"env": {
|
|
35
|
-
"type": "string",
|
|
36
|
-
"description": "Path to a `.env` file to load before performing the action."
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"required": [
|
|
40
|
-
"action",
|
|
41
|
-
"css"
|
|
42
|
-
],
|
|
43
|
-
"additionalProperties": false,
|
|
44
|
-
"examples": [
|
|
45
|
-
{
|
|
46
|
-
"action": "type",
|
|
47
|
-
"css": "[title=Search]",
|
|
48
|
-
"keys": "kittens"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"action": "type",
|
|
52
|
-
"css": "[title=Search]",
|
|
53
|
-
"trailingSpecialKey": "Enter"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"action": "type",
|
|
57
|
-
"css": "[title=Search]",
|
|
58
|
-
"keys": "kittens",
|
|
59
|
-
"trailingSpecialKey": "Enter"
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
}
|