@ashishjain15491/tapcheck 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -0
- package/LICENSE +21 -0
- package/README.md +243 -2
- package/dist/auth.d.ts +5 -0
- package/dist/auth.js +100 -0
- package/dist/browser.d.ts +143 -0
- package/dist/browser.js +237 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +321 -0
- package/dist/config.d.ts +169 -0
- package/dist/config.js +369 -0
- package/dist/coverage.d.ts +17 -0
- package/dist/coverage.js +56 -0
- package/dist/flow.d.ts +193 -0
- package/dist/flow.js +512 -0
- package/dist/jev.d.ts +48 -0
- package/dist/jev.js +89 -0
- package/dist/parts.d.ts +65 -0
- package/dist/parts.js +157 -0
- package/dist/questions.d.ts +66 -0
- package/dist/questions.js +203 -0
- package/dist/report.d.ts +29 -0
- package/dist/report.js +59 -0
- package/dist/routes.d.ts +18 -0
- package/dist/routes.js +54 -0
- package/dist/stub.d.ts +51 -0
- package/dist/stub.js +244 -0
- package/dist/suites/a11y.d.ts +3 -0
- package/dist/suites/a11y.js +73 -0
- package/dist/suites/audit.d.ts +2 -0
- package/dist/suites/audit.js +440 -0
- package/dist/suites/code.d.ts +10 -0
- package/dist/suites/code.js +48 -0
- package/dist/suites/contract.d.ts +5 -0
- package/dist/suites/contract.js +79 -0
- package/dist/suites/crawl.d.ts +2 -0
- package/dist/suites/crawl.js +135 -0
- package/dist/suites/interact.d.ts +2 -0
- package/dist/suites/interact.js +319 -0
- package/dist/suites/security.d.ts +12 -0
- package/dist/suites/security.js +134 -0
- package/dist/suites/usability.d.ts +3 -0
- package/dist/suites/usability.js +205 -0
- package/dist/suites/ux.d.ts +6 -0
- package/dist/suites/ux.js +183 -0
- package/package.json +61 -5
- package/schema/tapcheck.schema.json +368 -0
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/ashishjain15491/tapcheck/main/schema/tapcheck.schema.json",
|
|
4
|
+
"title": "tapcheck.yml",
|
|
5
|
+
"description": "What tapcheck needs to know about one web app. Only baseUrl is required. $NAME and ${NAME} (capitals) in any string are filled in from the environment when the file loads. Paths in gates, routes, flows and stub files are relative to this file's folder.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["baseUrl"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"baseUrl": {
|
|
11
|
+
"description": "The http(s) address of the running app. A trailing slash is dropped.",
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^(https?://[^/]+|.*\\$\\{?[A-Z_])"
|
|
14
|
+
},
|
|
15
|
+
"app": {
|
|
16
|
+
"description": "How to start, stop and reset the app.",
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"not": { "description": "resetWhen needs reset.", "required": ["resetWhen"], "properties": { "resetWhen": { "minItems": 1 } }, "not": { "required": ["reset"] } },
|
|
20
|
+
"properties": {
|
|
21
|
+
"start": { "$ref": "#/definitions/text", "description": "Shell command that starts the app. Skipped when the app already answers at `ready`; its whole process group is stopped after the run." },
|
|
22
|
+
"stop": { "$ref": "#/definitions/text", "description": "Optional extra shell command run after the run." },
|
|
23
|
+
"reset": { "$ref": "#/definitions/text", "description": "Shell command that puts the test data back. Runs first when RESET=1 (or when resetWhen says so); refused unless baseUrl is localhost, 127.0.0.1, *.localhost or *.test." },
|
|
24
|
+
"resetWhen": { "description": "Globs on paths from the git root (the migrations and seed files, say). `reset` runs before a run when a matching file changed since the last reset, and on first use. Needs `reset`; ignored outside git.", "type": "array", "items": { "$ref": "#/definitions/text" }, "default": [] },
|
|
25
|
+
"ready": { "$ref": "#/definitions/text", "description": "A path that answers once the app is up; any status under 500 counts.", "default": "/" },
|
|
26
|
+
"timeout": { "description": "Seconds to wait for `ready` after `start`.", "type": "number", "exclusiveMinimum": 0, "default": 120 },
|
|
27
|
+
"allowRemoteReset": { "description": "true lets RESET=1 run against an address that isn't local. Only for a remote throwaway copy.", "type": "boolean", "default": false }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"audience": { "$ref": "#/definitions/text", "description": "Who the app is for, in the words Jev is asked with (\"a shop owner\", \"a nurse on a ward\").", "default": "a first-time visitor" },
|
|
31
|
+
"sides": {
|
|
32
|
+
"description": "Each kind of person who sees a different app, by name. Names are lowercase letters, digits and dashes, and can't be a suite or tag name.",
|
|
33
|
+
"type": "object",
|
|
34
|
+
"minProperties": 1,
|
|
35
|
+
"default": { "public": {} },
|
|
36
|
+
"propertyNames": {
|
|
37
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
38
|
+
"not": { "enum": ["crawl", "contract", "security", "a11y", "interact", "audit", "ux", "usability", "code", "flow", "jev", "measured"] }
|
|
39
|
+
},
|
|
40
|
+
"additionalProperties": {
|
|
41
|
+
"type": ["object", "null"],
|
|
42
|
+
"additionalProperties": false,
|
|
43
|
+
"properties": {
|
|
44
|
+
"baseUrl": { "description": "This side's own address, when it differs from the top-level baseUrl.", "type": "string", "pattern": "^(https?://[^/]+|.*\\$\\{?[A-Z_])" },
|
|
45
|
+
"login": { "$ref": "#/definitions/login" },
|
|
46
|
+
"csrf": { "$ref": "#/definitions/csrf", "description": "This side's own CSRF probe, in place of security.csrf (another host often has other routes)." }
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"screens": {
|
|
51
|
+
"description": "The pages a11y, audit and ux check and the crawl starts from: a list for every side, or a map of side name to list. With none, all four use /.",
|
|
52
|
+
"oneOf": [
|
|
53
|
+
{ "type": "array", "items": { "$ref": "#/definitions/screen" } },
|
|
54
|
+
{ "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/screen" } } }
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"tasks": {
|
|
58
|
+
"description": "What a first-time user comes to do, for the usability suite: a list for every side, or a map of side name to list.",
|
|
59
|
+
"oneOf": [
|
|
60
|
+
{ "type": "array", "items": { "$ref": "#/definitions/task" } },
|
|
61
|
+
{ "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/task" } } }
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"loginPaths": {
|
|
65
|
+
"$ref": "#/definitions/text",
|
|
66
|
+
"description": "Regular expression (case-insensitive) on a URL path. Being sent to a matching path means \"not signed in\".",
|
|
67
|
+
"default": "/(login|sign-?in|two-factor|2fa)(/|$)"
|
|
68
|
+
},
|
|
69
|
+
"crawl": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"properties": {
|
|
73
|
+
"max": { "description": "Most pages crawled per side.", "type": "integer", "minimum": 1, "default": 60 },
|
|
74
|
+
"skip": {
|
|
75
|
+
"$ref": "#/definitions/text",
|
|
76
|
+
"description": "Regular expression (case-insensitive) of links never followed. Setting it replaces the default.",
|
|
77
|
+
"default": "/(logout|log-out|sign-?out|delete|destroy|remove|export|download|impersonat|unsubscribe)|\\.(csv|pdf|zip|png|jpe?g|gif|svg|webp|ico|xlsx?)$"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"interact": {
|
|
82
|
+
"description": "The interact suite: every safe control on the crawled screens is clicked, dialogs and tables are tried.",
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"properties": {
|
|
86
|
+
"max": { "description": "Most crawled screens clicked through per side.", "type": "integer", "minimum": 1, "default": 40 },
|
|
87
|
+
"submit": { "description": "true also submits dialog forms the app itself must refuse or accept, with invalid and then valid input. That changes data: only for a throwaway database, as with app.reset; ignored unless the app is local or app.allowRemoteReset is set.", "type": "boolean", "default": false }
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"audit": {
|
|
91
|
+
"description": "The audit suite: the full UI audit of the screens.",
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"properties": {
|
|
95
|
+
"max": { "description": "Most crawled pages audited per side on top of the screens. 0: the screens only. Needs the crawl in the same run.", "type": "integer", "minimum": 0, "default": 0 },
|
|
96
|
+
"skip": { "$ref": "#/definitions/text", "description": "Regular expression (case-insensitive) of paths the audit leaves out, e.g. a canvas or an editor: /(editor|canvas)(/|$)." }
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"design": {
|
|
100
|
+
"description": "The design tokens. The audit lists computed styles that are not among them as warnings; a list left out isn't checked.",
|
|
101
|
+
"type": "object",
|
|
102
|
+
"additionalProperties": false,
|
|
103
|
+
"properties": {
|
|
104
|
+
"colors": { "description": "Hex colours, in quotes: \"#1f2937\". Text, background and border colours are held to them.", "type": "array", "items": { "type": "string", "pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" } },
|
|
105
|
+
"fonts": { "description": "Font family names; the first family of each text is held to them.", "type": "array", "items": { "$ref": "#/definitions/text" } },
|
|
106
|
+
"radii": { "description": "Corner radii in px.", "type": "array", "items": { "type": "number", "minimum": 0 } },
|
|
107
|
+
"spacing": { "description": "Paddings, vertical margins and gaps in px.", "type": "array", "items": { "type": "number", "minimum": 0 } }
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"security": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"properties": {
|
|
114
|
+
"csrf": { "$ref": "#/definitions/csrf" },
|
|
115
|
+
"allowedHosts": { "description": "Third-party hosts the pages may call; a request to any other is a failing finding.", "type": "array", "items": { "type": "string" }, "default": [] },
|
|
116
|
+
"publicWrites": { "$ref": "#/definitions/text", "description": "Regular expression (case-insensitive) of POST/PUT/PATCH/DELETE routes that need no sign-in on purpose, e.g. ^/(login|webhooks/)." }
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"viewports": {
|
|
120
|
+
"description": "The screen sizes a11y and ux run on; the first is used by the crawl and flows, the first that isn't mobile by interact, audit and usability (audit adds a 768 px tablet and a 375 px phone of its own).",
|
|
121
|
+
"type": "array",
|
|
122
|
+
"minItems": 1,
|
|
123
|
+
"items": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"required": ["name", "width", "height"],
|
|
126
|
+
"additionalProperties": false,
|
|
127
|
+
"properties": {
|
|
128
|
+
"name": { "$ref": "#/definitions/text" },
|
|
129
|
+
"width": { "type": "integer" },
|
|
130
|
+
"height": { "type": "integer" },
|
|
131
|
+
"mobile": { "description": "Emulate a touch phone.", "type": "boolean", "default": false }
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"default": [
|
|
135
|
+
{ "name": "desktop", "width": 1440, "height": 900, "mobile": false },
|
|
136
|
+
{ "name": "mobile", "width": 390, "height": 844, "mobile": true }
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"out": { "$ref": "#/definitions/text", "description": "Where runs, signed-in sessions and state go. Git-ignore it.", "default": ".tapcheck" },
|
|
140
|
+
"jev": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"properties": {
|
|
144
|
+
"budget": { "description": "Most US dollars one run may spend on Jev. JEV_BUDGET overrides it.", "type": "number", "exclusiveMinimum": 0, "default": 1 },
|
|
145
|
+
"headers": { "description": "Extra headers sent with every Jev request.", "type": "object", "additionalProperties": { "$ref": "#/definitions/text" }, "default": {} }
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"i18n": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"additionalProperties": false,
|
|
151
|
+
"properties": {
|
|
152
|
+
"keys": { "$ref": "#/definitions/text", "description": "Shell command printing one translation key per line; ux then flags pages that show a raw key. Only dotted keys (orders.title) count." }
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"changes": {
|
|
156
|
+
"description": "For CHANGED=1 and CHANGED=<git ref>: which files each part or suite depends on, as globs on paths from the git root. A part name (flow-checkout, a11y-customer) wins over its suite; \"*\" adds to every part; a part with no globs reruns on any change.",
|
|
157
|
+
"type": "object",
|
|
158
|
+
"propertyNames": { "pattern": "^\\*$|^(crawl|contract|security|a11y|interact|audit|ux|usability|code|flow)(-.+)?$" },
|
|
159
|
+
"additionalProperties": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/text" } },
|
|
160
|
+
"default": {}
|
|
161
|
+
},
|
|
162
|
+
"gates": {
|
|
163
|
+
"description": "Commands from the project's own toolchain, run as the part `code`. Exit 0 passes.",
|
|
164
|
+
"type": "array",
|
|
165
|
+
"items": {
|
|
166
|
+
"type": "object",
|
|
167
|
+
"required": ["name", "run"],
|
|
168
|
+
"additionalProperties": false,
|
|
169
|
+
"properties": {
|
|
170
|
+
"name": { "$ref": "#/definitions/text" },
|
|
171
|
+
"run": { "$ref": "#/definitions/text", "description": "Shell command, run from this file's folder." },
|
|
172
|
+
"timeout": { "description": "Seconds before the gate is stopped and fails.", "type": "number", "exclusiveMinimum": 0, "default": 600 },
|
|
173
|
+
"warn": { "description": "true makes a non-zero exit a warning instead of a failure.", "type": "boolean", "default": false }
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"default": []
|
|
177
|
+
},
|
|
178
|
+
"routes": { "$ref": "#/definitions/text", "description": "Shell command printing the app's routes as JSON: [{method, path, auth?}]." },
|
|
179
|
+
"stub": {
|
|
180
|
+
"description": "A stand-in server for the outside services the app calls. Its address is TAPCHECK_STUB_URL.",
|
|
181
|
+
"type": "object",
|
|
182
|
+
"additionalProperties": false,
|
|
183
|
+
"properties": {
|
|
184
|
+
"port": { "type": "integer", "minimum": 1, "maximum": 65535, "default": 8766 },
|
|
185
|
+
"rules": {
|
|
186
|
+
"description": "The first matching rule answers; anything unmatched gets 200 {}.",
|
|
187
|
+
"type": "array",
|
|
188
|
+
"items": {
|
|
189
|
+
"type": "object",
|
|
190
|
+
"additionalProperties": false,
|
|
191
|
+
"properties": {
|
|
192
|
+
"host": { "$ref": "#/definitions/text", "description": "The outside host; also matches its subdomains." },
|
|
193
|
+
"method": { "$ref": "#/definitions/text" },
|
|
194
|
+
"path": { "$ref": "#/definitions/text", "description": "A glob, or a regular expression when it starts with ^." },
|
|
195
|
+
"status": { "type": "integer", "minimum": 100, "maximum": 599, "default": 200 },
|
|
196
|
+
"json": { "description": "The answer, sent as JSON." },
|
|
197
|
+
"body": { "description": "The answer, sent as text.", "type": ["string", "number", "boolean"] },
|
|
198
|
+
"file": { "$ref": "#/definitions/text", "description": "A file holding the answer, relative to this file's folder. It must exist." },
|
|
199
|
+
"headers": { "type": "object", "additionalProperties": { "type": "string" }, "default": {} },
|
|
200
|
+
"delayMs": { "description": "Milliseconds to wait before answering.", "type": "number", "minimum": 0, "default": 0 }
|
|
201
|
+
},
|
|
202
|
+
"not": {
|
|
203
|
+
"description": "A rule takes one of json, body or file.",
|
|
204
|
+
"anyOf": [{ "required": ["json", "body"] }, { "required": ["json", "file"] }, { "required": ["body", "file"] }]
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"default": []
|
|
208
|
+
},
|
|
209
|
+
"dns": {
|
|
210
|
+
"description": "Also answer DNS questions over UDP, for an app that looks up domains. Its address is TAPCHECK_DNS (host:port). A name containing tapcheck-fail doesn't exist.",
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"properties": {
|
|
214
|
+
"port": { "type": "integer", "minimum": 1, "maximum": 65535, "default": 8767 },
|
|
215
|
+
"records": {
|
|
216
|
+
"type": "array",
|
|
217
|
+
"items": {
|
|
218
|
+
"type": "object",
|
|
219
|
+
"additionalProperties": false,
|
|
220
|
+
"required": ["name", "type", "values"],
|
|
221
|
+
"properties": {
|
|
222
|
+
"name": { "$ref": "#/definitions/text", "description": "The full name asked for, such as shop.example.com." },
|
|
223
|
+
"type": { "enum": ["A", "AAAA", "MX", "TXT", "CNAME", "NS", "a", "aaaa", "mx", "txt", "cname", "ns"] },
|
|
224
|
+
"values": { "description": "A, AAAA: addresses. MX: a mail host, or \"<priority> <host>\". TXT: the text. CNAME, NS: a host name.", "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/text" } }
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"default": []
|
|
228
|
+
},
|
|
229
|
+
"defaultA": { "description": "The IPv4 address answered for an A question no record covers. Without it such a question gets no records.", "type": "string", "pattern": "^(\\d{1,3}\\.){3}\\d{1,3}$" }
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"coverage": {
|
|
235
|
+
"description": "COVERAGE=1: the coverage map merged from every run's hits.json.",
|
|
236
|
+
"type": "object",
|
|
237
|
+
"additionalProperties": false,
|
|
238
|
+
"properties": {
|
|
239
|
+
"file": { "$ref": "#/definitions/text", "description": "Where the map is written, from this file's folder.", "default": "COVERAGE.md" },
|
|
240
|
+
"reasons": {
|
|
241
|
+
"description": "Gaps that are there on purpose: a route (as \"GET /path\") matching `match` is listed with `why` instead of GAP.",
|
|
242
|
+
"type": "array",
|
|
243
|
+
"items": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"additionalProperties": false,
|
|
246
|
+
"required": ["match", "why"],
|
|
247
|
+
"properties": { "match": { "$ref": "#/definitions/text", "description": "A regular expression (case-insensitive)." }, "why": { "$ref": "#/definitions/text" } }
|
|
248
|
+
},
|
|
249
|
+
"default": []
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"parallel": {
|
|
254
|
+
"description": "How many flows of a side run at once (PARALLEL=<n> overrides it). A flow with serial: true runs alone; the suites run one by one either way. The app must handle that many users at once.",
|
|
255
|
+
"type": "integer", "minimum": 1, "maximum": 32, "default": 1
|
|
256
|
+
},
|
|
257
|
+
"flows": {
|
|
258
|
+
"description": "Globs of flow files (TypeScript or JavaScript); each file is its own part, flow-<name>. Flows may change data.",
|
|
259
|
+
"oneOf": [{ "$ref": "#/definitions/text" }, { "type": "array", "items": { "$ref": "#/definitions/text" } }],
|
|
260
|
+
"default": []
|
|
261
|
+
},
|
|
262
|
+
"mail": {
|
|
263
|
+
"type": "object",
|
|
264
|
+
"additionalProperties": false,
|
|
265
|
+
"properties": {
|
|
266
|
+
"mailpit": { "description": "The address of Mailpit's web page, for t.mail in flows.", "type": "string", "pattern": "^(https?://[^/]+|.*\\$\\{?[A-Z_])" }
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"browser": {
|
|
270
|
+
"type": "object",
|
|
271
|
+
"additionalProperties": false,
|
|
272
|
+
"properties": {
|
|
273
|
+
"args": { "description": "Extra command-line switches for the run's Chromium, e.g. --disable-features=LocalNetworkAccessChecks for an app on localhost whose sandboxed frames load its own files.", "type": "array", "items": { "type": "string", "pattern": "^--" }, "default": [] }
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"definitions": {
|
|
278
|
+
"csrf": {
|
|
279
|
+
"description": "A request sent without a token on each side that signs in (every side when none does); it must be refused with exactly `expect`.",
|
|
280
|
+
"type": "object",
|
|
281
|
+
"required": ["path", "expect"],
|
|
282
|
+
"additionalProperties": false,
|
|
283
|
+
"properties": {
|
|
284
|
+
"method": { "$ref": "#/definitions/text", "default": "POST" },
|
|
285
|
+
"path": { "$ref": "#/definitions/text" },
|
|
286
|
+
"expect": { "description": "The HTTP status the app answers with, e.g. 403 or 419.", "type": "integer" }
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"text": { "type": "string", "pattern": "\\S" },
|
|
290
|
+
"login": {
|
|
291
|
+
"description": "How this side signs in. Leaving it out means none.",
|
|
292
|
+
"default": "none",
|
|
293
|
+
"oneOf": [
|
|
294
|
+
{ "description": "none: no sign-in. manual: a visible browser opens /login and a person signs in once.", "enum": ["none", "manual"] },
|
|
295
|
+
{
|
|
296
|
+
"type": "object",
|
|
297
|
+
"required": ["manual"],
|
|
298
|
+
"additionalProperties": false,
|
|
299
|
+
"properties": { "manual": { "$ref": "#/definitions/text", "description": "The sign-in page a person signs in on, in a visible browser. The session is kept until it expires or LOGIN=1." } }
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"type": "object",
|
|
303
|
+
"required": ["command"],
|
|
304
|
+
"additionalProperties": false,
|
|
305
|
+
"properties": { "command": { "$ref": "#/definitions/text", "description": "Shell command printing a Playwright storageState JSON: {\"cookies\": [...], \"origins\": []}." } }
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"type": "object",
|
|
309
|
+
"required": ["form"],
|
|
310
|
+
"additionalProperties": false,
|
|
311
|
+
"properties": {
|
|
312
|
+
"form": {
|
|
313
|
+
"type": "object",
|
|
314
|
+
"required": ["url", "fields"],
|
|
315
|
+
"additionalProperties": false,
|
|
316
|
+
"properties": {
|
|
317
|
+
"url": { "$ref": "#/definitions/text", "description": "The sign-in page." },
|
|
318
|
+
"fields": {
|
|
319
|
+
"description": "Field to value. A key is a CSS selector, else a name attribute, else the label's text. Use $NAME for secrets.",
|
|
320
|
+
"type": "object",
|
|
321
|
+
"minProperties": 1,
|
|
322
|
+
"additionalProperties": { "$ref": "#/definitions/text" }
|
|
323
|
+
},
|
|
324
|
+
"submit": { "$ref": "#/definitions/text", "description": "CSS selector of the submit control. Default: the first submit button." },
|
|
325
|
+
"totp": {
|
|
326
|
+
"description": "Filled in when the app asks for a one-time code.",
|
|
327
|
+
"type": "object",
|
|
328
|
+
"required": ["field", "secret"],
|
|
329
|
+
"additionalProperties": false,
|
|
330
|
+
"properties": { "field": { "$ref": "#/definitions/text" }, "secret": { "$ref": "#/definitions/text", "description": "The base32 secret. Use $NAME." } }
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
},
|
|
338
|
+
"screen": {
|
|
339
|
+
"description": "A page by `path`, or by `from` + `link`: the first link on the `from` page whose path matches.",
|
|
340
|
+
"type": "object",
|
|
341
|
+
"required": ["name"],
|
|
342
|
+
"anyOf": [{ "required": ["path"] }, { "required": ["from", "link"] }],
|
|
343
|
+
"additionalProperties": false,
|
|
344
|
+
"properties": {
|
|
345
|
+
"name": { "$ref": "#/definitions/text" },
|
|
346
|
+
"path": { "$ref": "#/definitions/text", "description": "A path on the side's baseUrl, or a full URL." },
|
|
347
|
+
"from": { "$ref": "#/definitions/text", "description": "The page holding the link." },
|
|
348
|
+
"link": { "$ref": "#/definitions/text", "description": "Regular expression (case-insensitive) tested against each link's path." },
|
|
349
|
+
"suffix": { "$ref": "#/definitions/text", "description": "Added to the matched link's path, e.g. /edit." },
|
|
350
|
+
"purpose": { "$ref": "#/definitions/text", "description": "What the screen is for; the five-second test needs it." }
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"task": {
|
|
354
|
+
"type": "object",
|
|
355
|
+
"required": ["name", "from", "goal", "done", "notDone", "optimal"],
|
|
356
|
+
"additionalProperties": false,
|
|
357
|
+
"properties": {
|
|
358
|
+
"name": { "$ref": "#/definitions/text" },
|
|
359
|
+
"from": { "$ref": "#/definitions/text", "description": "Where the person starts." },
|
|
360
|
+
"goal": { "$ref": "#/definitions/text", "description": "What the person is trying to do." },
|
|
361
|
+
"done": { "$ref": "#/definitions/text", "description": "The screen that means the goal is reached." },
|
|
362
|
+
"notDone": { "$ref": "#/definitions/text", "description": "What the screen shows when it isn't." },
|
|
363
|
+
"optimal": { "description": "The fewest clicks that reach the goal.", "type": "integer", "minimum": 1 },
|
|
364
|
+
"text": { "$ref": "#/definitions/text", "description": "What the person would type into a search field on the way." }
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|