codeceptjs 4.2.0-beta.4 → 4.2.1-beta.1

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 (65) hide show
  1. package/README.md +2 -0
  2. package/bin/codecept.js +11 -0
  3. package/docs/agents.md +26 -1
  4. package/docs/ai.md +57 -0
  5. package/docs/alternative-browsers.md +175 -148
  6. package/docs/assertions.md +74 -0
  7. package/docs/bootstrap.md +2 -0
  8. package/docs/commands.md +45 -0
  9. package/docs/configuration.md +37 -0
  10. package/docs/debugging.md +1 -1
  11. package/docs/helpers/ApiDataFactory.md +20 -20
  12. package/docs/helpers/Appium.md +1615 -670
  13. package/docs/helpers/Decision.md +146 -0
  14. package/docs/helpers/GraphQL.md +31 -31
  15. package/docs/helpers/GraphQLDataFactory.md +20 -20
  16. package/docs/helpers/Kitesurf.md +1808 -25
  17. package/docs/helpers/Lightpanda.md +139 -0
  18. package/docs/helpers/Obscura.md +1799 -74
  19. package/docs/helpers/Playwright.md +490 -428
  20. package/docs/helpers/Puppeteer.md +317 -255
  21. package/docs/helpers/REST.md +43 -43
  22. package/docs/helpers/WebDriver.md +237 -175
  23. package/docs/installation.md +16 -0
  24. package/docs/mcp.md +7 -1
  25. package/docs/parallel.md +35 -1
  26. package/docs/plugins/pause.md +2 -1
  27. package/docs/plugins/sitemap.md +48 -0
  28. package/docs/plugins.md +4 -0
  29. package/lib/ai.js +81 -2
  30. package/lib/codecept.js +32 -2
  31. package/lib/command/init.js +22 -0
  32. package/lib/command/initAgent.js +78 -0
  33. package/lib/command/run-multiple.js +3 -0
  34. package/lib/command/run-workers.js +10 -3
  35. package/lib/command/run.js +3 -2
  36. package/lib/command/utils.js +15 -0
  37. package/lib/command/workers/runTests.js +10 -10
  38. package/lib/container.js +4 -2
  39. package/lib/effects.js +19 -1
  40. package/lib/helper/Appium.js +23 -0
  41. package/lib/helper/CDPBrowser.js +387 -1338
  42. package/lib/helper/Decision.js +256 -0
  43. package/lib/helper/Kitesurf.js +3 -21
  44. package/lib/helper/Lightpanda.js +137 -0
  45. package/lib/helper/Obscura.js +21 -238
  46. package/lib/helper/Playwright.js +50 -4
  47. package/lib/helper/Puppeteer.js +62 -8
  48. package/lib/helper/WebDriver.js +45 -1
  49. package/lib/helper/extras/clipboard.js +31 -0
  50. package/lib/listener/result.js +4 -0
  51. package/lib/mocha/bdd.js +19 -1
  52. package/lib/plugin/junitReporter.js +4 -1
  53. package/lib/plugin/pause.js +4 -1
  54. package/lib/plugin/sitemap.js +228 -0
  55. package/lib/recorder.js +19 -18
  56. package/lib/result.js +16 -0
  57. package/lib/step/base.js +12 -0
  58. package/lib/utils.js +2 -10
  59. package/lib/webServer.js +193 -0
  60. package/lib/workers.js +118 -31
  61. package/package.json +4 -2
  62. package/typings/index.d.ts +60 -7
  63. package/typings/promiseBasedTypes.d.ts +985 -814
  64. package/typings/types.d.ts +1084 -815
  65. package/docs/helpers/CDPBrowser.md +0 -2138
@@ -18,16 +18,16 @@ REST helper allows to send additional requests to the REST API during acceptance
18
18
 
19
19
  ## Configuration
20
20
 
21
- Type: [object][4]
21
+ Type: [object][3]
22
22
 
23
23
  ### Properties
24
24
 
25
- * `endpoint` **[string][3]?** API base URL
25
+ * `endpoint` **[string][2]?** API base URL
26
26
  * `prettyPrintJson` **[boolean][6]?** pretty print json for response/request on console logs.
27
27
  * `printCurl` **[boolean][6]?** print cURL request on console logs. False by default.
28
28
  * `timeout` **[number][5]?** timeout for requests in milliseconds. 10000ms by default.
29
- * `defaultHeaders` **[object][4]?** a list of default headers.
30
- * `httpAgent` **[object][4]?** create an agent with SSL certificate
29
+ * `defaultHeaders` **[object][3]?** a list of default headers.
30
+ * `httpAgent` **[object][3]?** create an agent with SSL certificate
31
31
  * `onRequest` **[function][7]?** an async function which can update request object.
32
32
  * `onResponse` **[function][7]?** an async function which can update response object.
33
33
  * `maxUploadFileSize` **[number][5]?** set the max content file size in MB when performing api calls.
@@ -102,24 +102,6 @@ this.helpers['REST']._executeRequest({
102
102
 
103
103
  * `config`  
104
104
 
105
- ### _executeRequest
106
-
107
- Executes axios request
108
-
109
- #### Parameters
110
-
111
- * `request` **any** 
112
-
113
- Returns **[Promise][2]<any>** response
114
-
115
- ### _url
116
-
117
- Generates url based on format sent (takes endpoint + url if latter lacks 'http')
118
-
119
- #### Parameters
120
-
121
- * `url` **any**&#x20;
122
-
123
105
  ### amBearerAuthenticated
124
106
 
125
107
  Adds a header for Bearer authentication
@@ -131,7 +113,7 @@ I.amBearerAuthenticated(secret('heregoestoken'))
131
113
 
132
114
  #### Parameters
133
115
 
134
- * `accessToken` **([string][3] | CodeceptJS.Secret)** Bearer access token
116
+ * `accessToken` **([string][2] | CodeceptJS.Secret)** Bearer access token
135
117
 
136
118
  ### haveRequestHeaders
137
119
 
@@ -139,7 +121,7 @@ Sets request headers for all requests of this test
139
121
 
140
122
  #### Parameters
141
123
 
142
- * `headers` **[object][4]** headers list
124
+ * `headers` **[object][3]** headers list
143
125
 
144
126
  ### sendDeleteRequest
145
127
 
@@ -152,9 +134,9 @@ I.sendDeleteRequest('/api/users/1');
152
134
  #### Parameters
153
135
 
154
136
  * `url` **any**&#x20;
155
- * `headers` **[object][4]** the headers object to be sent. By default, it is sent as an empty object
137
+ * `headers` **[object][3]** the headers object to be sent. By default, it is sent as an empty object
156
138
 
157
- Returns **[Promise][2]<any>** response
139
+ Returns **[Promise][4]<any>** response
158
140
 
159
141
  ### sendDeleteRequestWithPayload
160
142
 
@@ -168,9 +150,9 @@ I.sendDeleteRequestWithPayload('/api/users/1', { author: 'john' });
168
150
 
169
151
  * `url` **any**&#x20;
170
152
  * `payload` **any** the payload to be sent. By default it is sent as an empty object
171
- * `headers` **[object][4]** the headers object to be sent. By default, it is sent as an empty object
153
+ * `headers` **[object][3]** the headers object to be sent. By default, it is sent as an empty object
172
154
 
173
- Returns **[Promise][2]<any>** response
155
+ Returns **[Promise][4]<any>** response
174
156
 
175
157
  ### sendGetRequest
176
158
 
@@ -183,9 +165,9 @@ I.sendGetRequest('/api/users.json');
183
165
  #### Parameters
184
166
 
185
167
  * `url` **any**&#x20;
186
- * `headers` **[object][4]** the headers object to be sent. By default, it is sent as an empty object
168
+ * `headers` **[object][3]** the headers object to be sent. By default, it is sent as an empty object
187
169
 
188
- Returns **[Promise][2]<any>** response
170
+ Returns **[Promise][4]<any>** response
189
171
 
190
172
  ### sendHeadRequest
191
173
 
@@ -198,9 +180,9 @@ I.sendHeadRequest('/api/users.json');
198
180
  #### Parameters
199
181
 
200
182
  * `url` **any**&#x20;
201
- * `headers` **[object][4]** the headers object to be sent. By default, it is sent as an empty object
183
+ * `headers` **[object][3]** the headers object to be sent. By default, it is sent as an empty object
202
184
 
203
- Returns **[Promise][2]<any>** response
185
+ Returns **[Promise][4]<any>** response
204
186
 
205
187
  ### sendPatchRequest
206
188
 
@@ -216,11 +198,11 @@ I.sendPatchRequest('/api/users.json', secret({ "email": "user@user.com" }));
216
198
 
217
199
  #### Parameters
218
200
 
219
- * `url` **[string][3]**&#x20;
201
+ * `url` **[string][2]**&#x20;
220
202
  * `payload` **any** the payload to be sent. By default it is sent as an empty object
221
- * `headers` **[object][4]** the headers object to be sent. By default it is sent as an empty object
203
+ * `headers` **[object][3]** the headers object to be sent. By default it is sent as an empty object
222
204
 
223
- Returns **[Promise][2]<any>** response
205
+ Returns **[Promise][4]<any>** response
224
206
 
225
207
  ### sendPostRequest
226
208
 
@@ -238,9 +220,9 @@ I.sendPostRequest('/api/users.json', secret({ "email": "user@user.com" }));
238
220
 
239
221
  * `url` **any**&#x20;
240
222
  * `payload` **any** the payload to be sent. By default, it is sent as an empty object
241
- * `headers` **[object][4]** the headers object to be sent. By default, it is sent as an empty object
223
+ * `headers` **[object][3]** the headers object to be sent. By default, it is sent as an empty object
242
224
 
243
- Returns **[Promise][2]<any>** response
225
+ Returns **[Promise][4]<any>** response
244
226
 
245
227
  ### sendPutRequest
246
228
 
@@ -256,11 +238,11 @@ I.sendPutRequest('/api/users.json', secret({ "email": "user@user.com" }));
256
238
 
257
239
  #### Parameters
258
240
 
259
- * `url` **[string][3]**&#x20;
241
+ * `url` **[string][2]**&#x20;
260
242
  * `payload` **any** the payload to be sent. By default it is sent as an empty object
261
- * `headers` **[object][4]** the headers object to be sent. By default it is sent as an empty object
243
+ * `headers` **[object][3]** the headers object to be sent. By default it is sent as an empty object
262
244
 
263
- Returns **[Promise][2]<any>** response
245
+ Returns **[Promise][4]<any>** response
264
246
 
265
247
  ### setRequestTimeout
266
248
 
@@ -274,13 +256,31 @@ I.setRequestTimeout(10000); // In milliseconds
274
256
 
275
257
  * `newTimeout` **[number][5]** timeout in milliseconds
276
258
 
259
+ ### _executeRequest
260
+
261
+ Executes axios request
262
+
263
+ #### Parameters
264
+
265
+ * `request` **any**&#x20;
266
+
267
+ Returns **[Promise][4]<any>** response
268
+
269
+ ### _url
270
+
271
+ Generates url based on format sent (takes endpoint + url if latter lacks 'http')
272
+
273
+ #### Parameters
274
+
275
+ * `url` **any**&#x20;
276
+
277
277
  [1]: https://github.com/axios/axios
278
278
 
279
- [2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
279
+ [2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
280
280
 
281
- [3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
281
+ [3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
282
282
 
283
- [4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
283
+ [4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
284
284
 
285
285
  [5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
286
286