codeceptjs 3.3.3 → 3.3.5-beta.2
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 +38 -0
- package/docs/api.md +4 -0
- package/docs/basics.md +2 -0
- package/docs/bdd.md +12 -0
- package/docs/build/JSONResponse.js +44 -3
- package/docs/build/Playwright.js +63 -40
- package/docs/build/Puppeteer.js +54 -43
- package/docs/build/REST.js +23 -9
- package/docs/build/WebDriver.js +39 -30
- package/docs/community-helpers.md +1 -0
- package/docs/configuration.md +21 -18
- package/docs/helpers/Appium.md +0 -723
- package/docs/helpers/JSONResponse.md +24 -0
- package/docs/helpers/Playwright.md +276 -264
- package/docs/helpers/Puppeteer.md +230 -222
- package/docs/helpers/REST.md +21 -6
- package/docs/helpers/WebDriver.md +265 -259
- package/docs/plugins.md +41 -1
- package/docs/reports.md +11 -0
- package/docs/secrets.md +30 -0
- package/docs/wiki/.git/FETCH_HEAD +1 -0
- package/docs/wiki/.git/HEAD +1 -0
- package/docs/wiki/.git/ORIG_HEAD +1 -0
- package/docs/wiki/.git/config +11 -0
- package/docs/wiki/.git/description +1 -0
- package/docs/wiki/.git/hooks/applypatch-msg.sample +15 -0
- package/docs/wiki/.git/hooks/commit-msg.sample +24 -0
- package/docs/wiki/.git/hooks/fsmonitor-watchman.sample +173 -0
- package/docs/wiki/.git/hooks/post-update.sample +8 -0
- package/docs/wiki/.git/hooks/pre-applypatch.sample +14 -0
- package/docs/wiki/.git/hooks/pre-commit.sample +49 -0
- package/docs/wiki/.git/hooks/pre-merge-commit.sample +13 -0
- package/docs/wiki/.git/hooks/pre-push.sample +53 -0
- package/docs/wiki/.git/hooks/pre-rebase.sample +169 -0
- package/docs/wiki/.git/hooks/pre-receive.sample +24 -0
- package/docs/wiki/.git/hooks/prepare-commit-msg.sample +42 -0
- package/docs/wiki/.git/hooks/push-to-checkout.sample +78 -0
- package/docs/wiki/.git/hooks/update.sample +128 -0
- package/docs/wiki/.git/index +0 -0
- package/docs/wiki/.git/info/exclude +6 -0
- package/docs/wiki/.git/logs/HEAD +1 -0
- package/docs/wiki/.git/logs/refs/heads/master +1 -0
- package/docs/wiki/.git/logs/refs/remotes/origin/HEAD +1 -0
- package/docs/wiki/.git/objects/pack/pack-5938044f9d30daf1c195fda4dec1d54850933935.idx +0 -0
- package/docs/wiki/.git/objects/pack/pack-5938044f9d30daf1c195fda4dec1d54850933935.pack +0 -0
- package/docs/wiki/.git/packed-refs +2 -0
- package/docs/wiki/.git/refs/heads/master +1 -0
- package/docs/wiki/.git/refs/remotes/origin/HEAD +1 -0
- package/docs/wiki/Community-Helpers-&-Plugins.md +7 -3
- package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +29 -0
- package/docs/wiki/Examples.md +39 -48
- package/docs/wiki/Release-Process.md +8 -8
- package/docs/wiki/Tests.md +62 -60
- package/docs/wiki/Upgrading-to-CodeceptJS-3.md +2 -2
- package/lib/command/generate.js +3 -0
- package/lib/command/init.js +88 -41
- package/lib/command/interactive.js +1 -1
- package/lib/config.js +9 -0
- package/lib/helper/JSONResponse.js +44 -3
- package/lib/helper/Playwright.js +63 -40
- package/lib/helper/Puppeteer.js +54 -43
- package/lib/helper/REST.js +23 -9
- package/lib/helper/WebDriver.js +39 -30
- package/lib/interfaces/gherkin.js +1 -1
- package/lib/plugin/customLocator.js +50 -3
- package/lib/plugin/retryFailedStep.js +1 -1
- package/lib/plugin/retryTo.js +1 -8
- package/lib/secret.js +31 -1
- package/lib/step.js +22 -10
- package/lib/utils.js +1 -6
- package/package.json +4 -4
- package/typings/index.d.ts +158 -0
- package/typings/types.d.ts +367 -96
package/docs/helpers/REST.md
CHANGED
|
@@ -14,13 +14,23 @@ title: REST
|
|
|
14
14
|
REST helper allows to send additional requests to the REST API during acceptance tests.
|
|
15
15
|
[Axios][1] library is used to perform requests.
|
|
16
16
|
|
|
17
|
+
|
|
18
|
+
|
|
17
19
|
## Configuration
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
21
|
+
Type: [object][4]
|
|
22
|
+
|
|
23
|
+
### Properties
|
|
24
|
+
|
|
25
|
+
- `endpoint` **[string][3]** API base URL
|
|
26
|
+
- `prettyPrintJson` **[boolean][6]?** pretty print json for response/request on console logs
|
|
27
|
+
- `timeout` **[number][5]?** timeout for requests in milliseconds. 10000ms by default
|
|
28
|
+
- `defaultHeaders` **[object][4]?** a list of default headers
|
|
29
|
+
- `onRequest` **[function][7]?** a async function which can update request object.
|
|
30
|
+
- `onResponse` **[function][7]?** a async function which can update response object.
|
|
31
|
+
- `maxUploadFileSize` **[number][5]?** set the max content file size in MB when performing api calls.
|
|
32
|
+
|
|
33
|
+
|
|
24
34
|
|
|
25
35
|
## Example
|
|
26
36
|
|
|
@@ -29,6 +39,7 @@ REST helper allows to send additional requests to the REST API during acceptance
|
|
|
29
39
|
helpers: {
|
|
30
40
|
REST: {
|
|
31
41
|
endpoint: 'http://site.com/api',
|
|
42
|
+
prettyPrintJson: true,
|
|
32
43
|
onRequest: (request) => {
|
|
33
44
|
request.headers.auth = '123';
|
|
34
45
|
}
|
|
@@ -191,7 +202,7 @@ I.setRequestTimeout(10000); // In milliseconds
|
|
|
191
202
|
|
|
192
203
|
- `newTimeout` **[number][5]** timeout in milliseconds
|
|
193
204
|
|
|
194
|
-
|
|
205
|
+
: https://github.com/axios/axios
|
|
195
206
|
|
|
196
207
|
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
|
197
208
|
|
|
@@ -200,3 +211,7 @@ I.setRequestTimeout(10000); // In milliseconds
|
|
|
200
211
|
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
201
212
|
|
|
202
213
|
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
214
|
+
|
|
215
|
+
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
216
|
+
|
|
217
|
+
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
|