codeceptjs 3.7.0-beta.9 → 3.7.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.
Files changed (50) hide show
  1. package/bin/codecept.js +1 -1
  2. package/lib/codecept.js +14 -12
  3. package/lib/command/check.js +33 -9
  4. package/lib/command/definitions.js +1 -1
  5. package/lib/command/gherkin/snippets.js +69 -69
  6. package/lib/command/interactive.js +1 -1
  7. package/lib/command/run-multiple/chunk.js +48 -45
  8. package/lib/container.js +14 -7
  9. package/lib/effects.js +7 -2
  10. package/lib/event.js +2 -0
  11. package/lib/helper/AI.js +2 -1
  12. package/lib/helper/Playwright.js +1 -1
  13. package/lib/helper/Puppeteer.js +1 -1
  14. package/lib/helper/extras/Popup.js +22 -22
  15. package/lib/mocha/asyncWrapper.js +3 -1
  16. package/lib/mocha/gherkin.js +1 -1
  17. package/lib/mocha/inject.js +5 -0
  18. package/lib/mocha/test.js +5 -2
  19. package/lib/plugin/analyze.js +50 -3
  20. package/lib/plugin/auth.js +435 -0
  21. package/lib/plugin/autoDelay.js +2 -2
  22. package/lib/plugin/autoLogin.js +3 -337
  23. package/lib/plugin/pageInfo.js +1 -1
  24. package/lib/plugin/retryFailedStep.js +13 -14
  25. package/lib/plugin/retryTo.js +6 -17
  26. package/lib/plugin/screenshotOnFail.js +4 -5
  27. package/lib/plugin/standardActingHelpers.js +4 -1
  28. package/lib/plugin/stepByStepReport.js +1 -1
  29. package/lib/plugin/tryTo.js +6 -15
  30. package/lib/recorder.js +1 -0
  31. package/lib/step/base.js +15 -4
  32. package/lib/step/comment.js +10 -0
  33. package/lib/store.js +29 -5
  34. package/lib/utils.js +1 -1
  35. package/lib/within.js +2 -0
  36. package/package.json +18 -18
  37. package/translations/de-DE.js +4 -3
  38. package/translations/fr-FR.js +4 -3
  39. package/translations/index.js +1 -0
  40. package/translations/it-IT.js +4 -3
  41. package/translations/ja-JP.js +4 -3
  42. package/translations/nl-NL.js +76 -0
  43. package/translations/pl-PL.js +4 -3
  44. package/translations/pt-BR.js +4 -3
  45. package/translations/ru-RU.js +4 -3
  46. package/translations/utils.js +9 -0
  47. package/translations/zh-CN.js +4 -3
  48. package/translations/zh-TW.js +4 -3
  49. package/typings/promiseBasedTypes.d.ts +0 -652
  50. package/typings/types.d.ts +99 -655
@@ -1203,266 +1203,6 @@ declare namespace CodeceptJS {
1203
1203
  */
1204
1204
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
1205
1205
  }
1206
- /**
1207
- * This helper allows performing assertions based on Chai.
1208
- *
1209
- * ### Examples
1210
- *
1211
- * Zero-configuration when paired with other helpers like REST, Playwright:
1212
- *
1213
- * ```js
1214
- * // inside codecept.conf.js
1215
- * {
1216
- * helpers: {
1217
- * Playwright: {...},
1218
- * ExpectHelper: {},
1219
- * }
1220
- * }
1221
- * ```
1222
- *
1223
- * ## Methods
1224
- */
1225
- // @ts-ignore
1226
- // @ts-ignore
1227
- // @ts-ignore
1228
- // @ts-ignore
1229
- // @ts-ignore
1230
- // @ts-ignore
1231
- // @ts-ignore
1232
- // @ts-ignore
1233
- // @ts-ignore
1234
- // @ts-ignore
1235
- // @ts-ignore
1236
- // @ts-ignore
1237
- // @ts-ignore
1238
- // @ts-ignore
1239
- // @ts-ignore
1240
- // @ts-ignore
1241
- // @ts-ignore
1242
- // @ts-ignore
1243
- // @ts-ignore
1244
- class ExpectHelper {
1245
- expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1246
- expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1247
- expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1248
- expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1249
- expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): void;
1250
- expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): void;
1251
- expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): void;
1252
- expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): void;
1253
- expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): void;
1254
- expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): void;
1255
- expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): void;
1256
- /**
1257
- * @param [ajvOptions] - Pass AJV options
1258
- */
1259
- expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): void;
1260
- expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1261
- expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1262
- expectToBeA(targetData: any, type: any, customErrorMsg?: any): void;
1263
- expectToBeAn(targetData: any, type: any, customErrorMsg?: any): void;
1264
- expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): void;
1265
- expectLengthOf(targetData: any, length: any, customErrorMsg?: any): void;
1266
- expectEmpty(targetData: any, customErrorMsg?: any): void;
1267
- expectTrue(targetData: any, customErrorMsg?: any): void;
1268
- expectFalse(targetData: any, customErrorMsg?: any): void;
1269
- expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): void;
1270
- expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): void;
1271
- expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): void;
1272
- expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): void;
1273
- expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1274
- /**
1275
- * expects members of two arrays are deeply equal
1276
- */
1277
- expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1278
- /**
1279
- * expects an array to be a superset of another array
1280
- */
1281
- expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): void;
1282
- /**
1283
- * expects members of two JSON objects are deeply equal excluding some properties
1284
- */
1285
- expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): void;
1286
- /**
1287
- * expects a JSON object matches a provided pattern
1288
- */
1289
- expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): void;
1290
- expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1291
- expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1292
- expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1293
- expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1294
- expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): void;
1295
- expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): void;
1296
- expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): void;
1297
- expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): void;
1298
- expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): void;
1299
- expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): void;
1300
- expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): void;
1301
- /**
1302
- * @param [ajvOptions] - Pass AJV options
1303
- */
1304
- expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): void;
1305
- expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1306
- expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1307
- expectToBeA(targetData: any, type: any, customErrorMsg?: any): void;
1308
- expectToBeAn(targetData: any, type: any, customErrorMsg?: any): void;
1309
- expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): void;
1310
- expectLengthOf(targetData: any, length: any, customErrorMsg?: any): void;
1311
- expectEmpty(targetData: any, customErrorMsg?: any): void;
1312
- expectTrue(targetData: any, customErrorMsg?: any): void;
1313
- expectFalse(targetData: any, customErrorMsg?: any): void;
1314
- expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): void;
1315
- expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): void;
1316
- expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): void;
1317
- expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): void;
1318
- expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1319
- /**
1320
- * expects members of two arrays are deeply equal
1321
- */
1322
- expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1323
- /**
1324
- * expects an array to be a superset of another array
1325
- */
1326
- expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): void;
1327
- /**
1328
- * expects members of two JSON objects are deeply equal excluding some properties
1329
- */
1330
- expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): void;
1331
- /**
1332
- * expects a JSON object matches a provided pattern
1333
- */
1334
- expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): void;
1335
- }
1336
- /**
1337
- * This helper allows performing assertions based on Chai.
1338
- *
1339
- * ### Examples
1340
- *
1341
- * Zero-configuration when paired with other helpers like REST, Playwright:
1342
- *
1343
- * ```js
1344
- * // inside codecept.conf.js
1345
- * {
1346
- * helpers: {
1347
- * Playwright: {...},
1348
- * ExpectHelper: {},
1349
- * }
1350
- * }
1351
- * ```
1352
- *
1353
- * ## Methods
1354
- */
1355
- // @ts-ignore
1356
- // @ts-ignore
1357
- // @ts-ignore
1358
- // @ts-ignore
1359
- // @ts-ignore
1360
- // @ts-ignore
1361
- // @ts-ignore
1362
- // @ts-ignore
1363
- // @ts-ignore
1364
- // @ts-ignore
1365
- // @ts-ignore
1366
- // @ts-ignore
1367
- // @ts-ignore
1368
- // @ts-ignore
1369
- // @ts-ignore
1370
- // @ts-ignore
1371
- // @ts-ignore
1372
- // @ts-ignore
1373
- // @ts-ignore
1374
- class ExpectHelper {
1375
- expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1376
- expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1377
- expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1378
- expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1379
- expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): void;
1380
- expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): void;
1381
- expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): void;
1382
- expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): void;
1383
- expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): void;
1384
- expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): void;
1385
- expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): void;
1386
- /**
1387
- * @param [ajvOptions] - Pass AJV options
1388
- */
1389
- expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): void;
1390
- expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1391
- expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1392
- expectToBeA(targetData: any, type: any, customErrorMsg?: any): void;
1393
- expectToBeAn(targetData: any, type: any, customErrorMsg?: any): void;
1394
- expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): void;
1395
- expectLengthOf(targetData: any, length: any, customErrorMsg?: any): void;
1396
- expectEmpty(targetData: any, customErrorMsg?: any): void;
1397
- expectTrue(targetData: any, customErrorMsg?: any): void;
1398
- expectFalse(targetData: any, customErrorMsg?: any): void;
1399
- expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): void;
1400
- expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): void;
1401
- expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): void;
1402
- expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): void;
1403
- expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1404
- /**
1405
- * expects members of two arrays are deeply equal
1406
- */
1407
- expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1408
- /**
1409
- * expects an array to be a superset of another array
1410
- */
1411
- expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): void;
1412
- /**
1413
- * expects members of two JSON objects are deeply equal excluding some properties
1414
- */
1415
- expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): void;
1416
- /**
1417
- * expects a JSON object matches a provided pattern
1418
- */
1419
- expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): void;
1420
- expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1421
- expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1422
- expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1423
- expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1424
- expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): void;
1425
- expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): void;
1426
- expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): void;
1427
- expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): void;
1428
- expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): void;
1429
- expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): void;
1430
- expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): void;
1431
- /**
1432
- * @param [ajvOptions] - Pass AJV options
1433
- */
1434
- expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): void;
1435
- expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1436
- expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1437
- expectToBeA(targetData: any, type: any, customErrorMsg?: any): void;
1438
- expectToBeAn(targetData: any, type: any, customErrorMsg?: any): void;
1439
- expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): void;
1440
- expectLengthOf(targetData: any, length: any, customErrorMsg?: any): void;
1441
- expectEmpty(targetData: any, customErrorMsg?: any): void;
1442
- expectTrue(targetData: any, customErrorMsg?: any): void;
1443
- expectFalse(targetData: any, customErrorMsg?: any): void;
1444
- expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): void;
1445
- expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): void;
1446
- expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): void;
1447
- expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): void;
1448
- expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1449
- /**
1450
- * expects members of two arrays are deeply equal
1451
- */
1452
- expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1453
- /**
1454
- * expects an array to be a superset of another array
1455
- */
1456
- expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): void;
1457
- /**
1458
- * expects members of two JSON objects are deeply equal excluding some properties
1459
- */
1460
- expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): void;
1461
- /**
1462
- * expects a JSON object matches a provided pattern
1463
- */
1464
- expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): void;
1465
- }
1466
1206
  /**
1467
1207
  * Helper for testing filesystem.
1468
1208
  * Can be easily used to check file structures:
@@ -2047,24 +1787,6 @@ declare namespace CodeceptJS {
2047
1787
  * @property [httpsOpts] - key & cert values are the paths to .key and .crt files
2048
1788
  */
2049
1789
  // @ts-ignore
2050
- // @ts-ignore
2051
- // @ts-ignore
2052
- // @ts-ignore
2053
- // @ts-ignore
2054
- // @ts-ignore
2055
- // @ts-ignore
2056
- // @ts-ignore
2057
- // @ts-ignore
2058
- // @ts-ignore
2059
- // @ts-ignore
2060
- // @ts-ignore
2061
- // @ts-ignore
2062
- // @ts-ignore
2063
- // @ts-ignore
2064
- // @ts-ignore
2065
- // @ts-ignore
2066
- // @ts-ignore
2067
- // @ts-ignore
2068
1790
  type MockServerConfig = {
2069
1791
  port?: number;
2070
1792
  host?: string;
@@ -2190,24 +1912,6 @@ declare namespace CodeceptJS {
2190
1912
  * ## Methods
2191
1913
  */
2192
1914
  // @ts-ignore
2193
- // @ts-ignore
2194
- // @ts-ignore
2195
- // @ts-ignore
2196
- // @ts-ignore
2197
- // @ts-ignore
2198
- // @ts-ignore
2199
- // @ts-ignore
2200
- // @ts-ignore
2201
- // @ts-ignore
2202
- // @ts-ignore
2203
- // @ts-ignore
2204
- // @ts-ignore
2205
- // @ts-ignore
2206
- // @ts-ignore
2207
- // @ts-ignore
2208
- // @ts-ignore
2209
- // @ts-ignore
2210
- // @ts-ignore
2211
1915
  class MockServer {
2212
1916
  /**
2213
1917
  * Start the mock server
@@ -3263,46 +2967,6 @@ declare namespace CodeceptJS {
3263
2967
  */
3264
2968
  grabPageScrollPosition(): Promise<PageScrollPosition>;
3265
2969
  }
3266
- /**
3267
- * OpenAI Helper for CodeceptJS.
3268
- *
3269
- * This helper class provides integration with the OpenAI GPT-3.5 or 4 language model for generating responses to questions or prompts within the context of web pages. It allows you to interact with the GPT-3.5 model to obtain intelligent responses based on HTML fragments or general prompts.
3270
- * This helper should be enabled with any web helpers like Playwright or Puppeteer or WebDrvier to ensure the HTML context is available.
3271
- *
3272
- * ## Configuration
3273
- *
3274
- * This helper should be configured in codecept.json or codecept.conf.js
3275
- *
3276
- * * `chunkSize`: (optional, default: 80000) - The maximum number of characters to send to the OpenAI API at once. We split HTML fragments by 8000 chars to not exceed token limit. Increase this value if you use GPT-4.
3277
- */
3278
- class OpenAI {
3279
- /**
3280
- * Asks the OpenAI GPT language model a question based on the provided prompt within the context of the current page's HTML.
3281
- *
3282
- * ```js
3283
- * I.askGptOnPage('what does this page do?');
3284
- * ```
3285
- * @param prompt - The question or prompt to ask the GPT model.
3286
- * @returns - A Promise that resolves to the generated responses from the GPT model, joined by newlines.
3287
- */
3288
- askGptOnPage(prompt: string): Promise<string>;
3289
- /**
3290
- * Asks the OpenAI GPT-3.5 language model a question based on the provided prompt within the context of a specific HTML fragment on the current page.
3291
- *
3292
- * ```js
3293
- * I.askGptOnPageFragment('describe features of this screen', '.screen');
3294
- * ```
3295
- * @param prompt - The question or prompt to ask the GPT-3.5 model.
3296
- * @param locator - The locator or selector used to identify the HTML fragment on the page.
3297
- * @returns - A Promise that resolves to the generated response from the GPT model.
3298
- */
3299
- askGptOnPageFragment(prompt: string, locator: string): Promise<string>;
3300
- /**
3301
- * Send a general request to ChatGPT and return response.
3302
- * @returns - A Promise that resolves to the generated response from the GPT model.
3303
- */
3304
- askGptGeneralPrompt(prompt: string): Promise<string>;
3305
- }
3306
2970
  /**
3307
2971
  * ## Configuration
3308
2972
  *
@@ -3348,24 +3012,6 @@ declare namespace CodeceptJS {
3348
3012
  * @property [testIdAttribute = data-testid] - locate elements based on the testIdAttribute. See more of [locate by test id](https://playwright.dev/docs/locators#locate-by-test-id).
3349
3013
  */
3350
3014
  // @ts-ignore
3351
- // @ts-ignore
3352
- // @ts-ignore
3353
- // @ts-ignore
3354
- // @ts-ignore
3355
- // @ts-ignore
3356
- // @ts-ignore
3357
- // @ts-ignore
3358
- // @ts-ignore
3359
- // @ts-ignore
3360
- // @ts-ignore
3361
- // @ts-ignore
3362
- // @ts-ignore
3363
- // @ts-ignore
3364
- // @ts-ignore
3365
- // @ts-ignore
3366
- // @ts-ignore
3367
- // @ts-ignore
3368
- // @ts-ignore
3369
3015
  type PlaywrightConfig = {
3370
3016
  url?: string;
3371
3017
  browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
@@ -6894,24 +6540,6 @@ declare namespace CodeceptJS {
6894
6540
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
6895
6541
  */
6896
6542
  // @ts-ignore
6897
- // @ts-ignore
6898
- // @ts-ignore
6899
- // @ts-ignore
6900
- // @ts-ignore
6901
- // @ts-ignore
6902
- // @ts-ignore
6903
- // @ts-ignore
6904
- // @ts-ignore
6905
- // @ts-ignore
6906
- // @ts-ignore
6907
- // @ts-ignore
6908
- // @ts-ignore
6909
- // @ts-ignore
6910
- // @ts-ignore
6911
- // @ts-ignore
6912
- // @ts-ignore
6913
- // @ts-ignore
6914
- // @ts-ignore
6915
6543
  type PuppeteerConfig = {
6916
6544
  url: string;
6917
6545
  basicAuth?: any;
@@ -8855,24 +8483,6 @@ declare namespace CodeceptJS {
8855
8483
  * @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
8856
8484
  */
8857
8485
  // @ts-ignore
8858
- // @ts-ignore
8859
- // @ts-ignore
8860
- // @ts-ignore
8861
- // @ts-ignore
8862
- // @ts-ignore
8863
- // @ts-ignore
8864
- // @ts-ignore
8865
- // @ts-ignore
8866
- // @ts-ignore
8867
- // @ts-ignore
8868
- // @ts-ignore
8869
- // @ts-ignore
8870
- // @ts-ignore
8871
- // @ts-ignore
8872
- // @ts-ignore
8873
- // @ts-ignore
8874
- // @ts-ignore
8875
- // @ts-ignore
8876
8486
  type RESTConfig = {
8877
8487
  endpoint?: string;
8878
8488
  prettyPrintJson?: boolean;
@@ -9065,250 +8675,6 @@ declare namespace CodeceptJS {
9065
8675
  */
9066
8676
  sendDeleteRequestWithPayload(url: any, payload?: any, headers?: any): Promise<any>;
9067
8677
  }
9068
- /**
9069
- * SoftAssertHelper is a utility class for performing soft assertions.
9070
- * Unlike traditional assertions that stop the execution on failure,
9071
- * soft assertions allow the execution to continue and report all failures at the end.
9072
- *
9073
- * ### Examples
9074
- *
9075
- * Zero-configuration when paired with other helpers like REST, Playwright:
9076
- *
9077
- * ```js
9078
- * // inside codecept.conf.js
9079
- * {
9080
- * helpers: {
9081
- * Playwright: {...},
9082
- * SoftExpectHelper: {},
9083
- * }
9084
- * }
9085
- * ```
9086
- *
9087
- * ```js
9088
- * // in scenario
9089
- * I.softExpectEqual('a', 'b')
9090
- * I.flushSoftAssertions() // Throws an error if any soft assertions have failed. The error message contains all the accumulated failures.
9091
- * ```
9092
- *
9093
- * ## Methods
9094
- */
9095
- class SoftAssertHelper {
9096
- /**
9097
- * Performs a soft assertion by executing the provided assertion function.
9098
- * If the assertion fails, the error is caught and stored without halting the execution.
9099
- * @param assertionFn - The assertion function to execute.
9100
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9101
- */
9102
- softAssert(assertionFn: (...params: any[]) => any, customErrorMsg?: string): void;
9103
- /**
9104
- * Throws an error if any soft assertions have failed.
9105
- * The error message contains all the accumulated failures.
9106
- */
9107
- flushSoftAssertions(): void;
9108
- /**
9109
- * Softly asserts that two values are equal.
9110
- * @param actualValue - The actual value.
9111
- * @param expectedValue - The expected value.
9112
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9113
- */
9114
- softExpectEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
9115
- /**
9116
- * Softly asserts that two values are not equal.
9117
- * @param actualValue - The actual value.
9118
- * @param expectedValue - The expected value.
9119
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9120
- */
9121
- softExpectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
9122
- /**
9123
- * Softly asserts that two values are deeply equal.
9124
- * @param actualValue - The actual value.
9125
- * @param expectedValue - The expected value.
9126
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9127
- */
9128
- softExpectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
9129
- /**
9130
- * Softly asserts that two values are not deeply equal.
9131
- * @param actualValue - The actual value.
9132
- * @param expectedValue - The expected value.
9133
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9134
- */
9135
- softExpectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
9136
- /**
9137
- * Softly asserts that a value contains the expected value.
9138
- * @param actualValue - The actual value.
9139
- * @param expectedValueToContain - The value that should be contained within the actual value.
9140
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9141
- */
9142
- softExpectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: string): void;
9143
- /**
9144
- * Softly asserts that a value does not contain the expected value.
9145
- * @param actualValue - The actual value.
9146
- * @param expectedValueToNotContain - The value that should not be contained within the actual value.
9147
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9148
- */
9149
- softExpectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: string): void;
9150
- /**
9151
- * Softly asserts that a value starts with the expected value.
9152
- * @param actualValue - The actual value.
9153
- * @param expectedValueToStartWith - The value that the actual value should start with.
9154
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9155
- */
9156
- softExpectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: string): void;
9157
- /**
9158
- * Softly asserts that a value does not start with the expected value.
9159
- * @param actualValue - The actual value.
9160
- * @param expectedValueToNotStartWith - The value that the actual value should not start with.
9161
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9162
- */
9163
- softExpectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: string): void;
9164
- /**
9165
- * Softly asserts that a value ends with the expected value.
9166
- * @param actualValue - The actual value.
9167
- * @param expectedValueToEndWith - The value that the actual value should end with.
9168
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9169
- */
9170
- softExpectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: string): void;
9171
- /**
9172
- * Softly asserts that a value does not end with the expected value.
9173
- * @param actualValue - The actual value.
9174
- * @param expectedValueToNotEndWith - The value that the actual value should not end with.
9175
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9176
- */
9177
- softExpectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: string): void;
9178
- /**
9179
- * Softly asserts that the target data matches the given JSON schema.
9180
- * @param targetData - The data to validate.
9181
- * @param jsonSchema - The JSON schema to validate against.
9182
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9183
- */
9184
- softExpectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: string): void;
9185
- /**
9186
- * Softly asserts that the target data matches the given JSON schema using AJV.
9187
- * @param targetData - The data to validate.
9188
- * @param jsonSchema - The JSON schema to validate against.
9189
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9190
- * @param [ajvOptions = { allErrors: true }] - Options to pass to AJV.
9191
- */
9192
- softExpectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: string, ajvOptions?: any): void;
9193
- /**
9194
- * Softly asserts that the target data has the specified property.
9195
- * @param targetData - The data to check.
9196
- * @param propertyName - The property name to check for.
9197
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion
9198
- * fails.
9199
- */
9200
- softExpectHasProperty(targetData: any, propertyName: string, customErrorMsg?: string): void;
9201
- /**
9202
- * Softly asserts that the target data has a property with the specified name.
9203
- * @param targetData - The data to check.
9204
- * @param propertyName - The property name to check for.
9205
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9206
- */
9207
- softExpectHasAProperty(targetData: any, propertyName: string, customErrorMsg?: string): void;
9208
- /**
9209
- * Softly asserts that the target data is of a specific type.
9210
- * @param targetData - The data to check.
9211
- * @param type - The expected type (e.g., 'string', 'number').
9212
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9213
- */
9214
- softExpectToBeA(targetData: any, type: string, customErrorMsg?: string): void;
9215
- /**
9216
- * Softly asserts that the target data is of a specific type (alternative for articles).
9217
- * @param targetData - The data to check.
9218
- * @param type - The expected type (e.g., 'string', 'number').
9219
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9220
- */
9221
- softExpectToBeAn(targetData: any, type: string, customErrorMsg?: string): void;
9222
- /**
9223
- * Softly asserts that the target data has a specified length.
9224
- * @param targetData - The data to check.
9225
- * @param length - The expected length.
9226
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9227
- */
9228
- softExpectLengthOf(targetData: any, length: number, customErrorMsg?: string): void;
9229
- /**
9230
- * Softly asserts that the target data is empty.
9231
- * @param targetData - The data to check.
9232
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9233
- */
9234
- softExpectEmpty(targetData: any, customErrorMsg?: string): void;
9235
- /**
9236
- * Softly asserts that the target data is true.
9237
- * @param targetData - The data to check.
9238
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9239
- */
9240
- softExpectTrue(targetData: any, customErrorMsg?: string): void;
9241
- /**
9242
- * Softly asserts that the target data is false.
9243
- * @param targetData - The data to check.
9244
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9245
- */
9246
- softExpectFalse(targetData: any, customErrorMsg?: string): void;
9247
- /**
9248
- * Softly asserts that the target data is above a specified value.
9249
- * @param targetData - The data to check.
9250
- * @param aboveThan - The value that the target data should be above.
9251
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9252
- */
9253
- softExpectAbove(targetData: any, aboveThan: any, customErrorMsg?: string): void;
9254
- /**
9255
- * Softly asserts that the target data is below a specified value.
9256
- * @param targetData - The data to check.
9257
- * @param belowThan - The value that the target data should be below.
9258
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9259
- */
9260
- softExpectBelow(targetData: any, belowThan: any, customErrorMsg?: string): void;
9261
- /**
9262
- * Softly asserts that the length of the target data is above a specified value.
9263
- * @param targetData - The data to check.
9264
- * @param lengthAboveThan - The length that the target data should be above.
9265
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9266
- */
9267
- softExpectLengthAboveThan(targetData: any, lengthAboveThan: number, customErrorMsg?: string): void;
9268
- /**
9269
- * Softly asserts that the length of the target data is below a specified value.
9270
- * @param targetData - The data to check.
9271
- * @param lengthBelowThan - The length that the target data should be below.
9272
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9273
- */
9274
- softExpectLengthBelowThan(targetData: any, lengthBelowThan: number, customErrorMsg?: string): void;
9275
- /**
9276
- * Softly asserts that two values are equal, ignoring case.
9277
- * @param actualValue - The actual string value.
9278
- * @param expectedValue - The expected string value.
9279
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9280
- */
9281
- softExpectEqualIgnoreCase(actualValue: string, expectedValue: string, customErrorMsg?: string): void;
9282
- /**
9283
- * Softly asserts that two arrays have deep equality, considering members in any order.
9284
- * @param actualValue - The actual array.
9285
- * @param expectedValue - The expected array.
9286
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9287
- */
9288
- softExpectDeepMembers(actualValue: any[], expectedValue: any[], customErrorMsg?: string): void;
9289
- /**
9290
- * Softly asserts that an array (superset) deeply includes all members of another array (set).
9291
- * @param superset - The array that should contain the expected members.
9292
- * @param set - The array with members that should be included.
9293
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9294
- */
9295
- softExpectDeepIncludeMembers(superset: any[], set: any[], customErrorMsg?: string): void;
9296
- /**
9297
- * Softly asserts that two objects are deeply equal, excluding specified fields.
9298
- * @param actualValue - The actual object.
9299
- * @param expectedValue - The expected object.
9300
- * @param fieldsToExclude - The fields to exclude from the comparison.
9301
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9302
- */
9303
- softExpectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: string[], customErrorMsg?: string): void;
9304
- /**
9305
- * Softly asserts that a value matches the expected pattern.
9306
- * @param actualValue - The actual value.
9307
- * @param expectedPattern - The pattern the value should match.
9308
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9309
- */
9310
- softExpectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: string): void;
9311
- }
9312
8678
  /**
9313
8679
  * Client Functions
9314
8680
  */
@@ -10322,24 +9688,6 @@ declare namespace CodeceptJS {
10322
9688
  * @property [logLevel = silent] - level of logging verbosity. Default: silent. Options: trace | debug | info | warn | error | silent. More info: https://webdriver.io/docs/configuration/#loglevel
10323
9689
  */
10324
9690
  // @ts-ignore
10325
- // @ts-ignore
10326
- // @ts-ignore
10327
- // @ts-ignore
10328
- // @ts-ignore
10329
- // @ts-ignore
10330
- // @ts-ignore
10331
- // @ts-ignore
10332
- // @ts-ignore
10333
- // @ts-ignore
10334
- // @ts-ignore
10335
- // @ts-ignore
10336
- // @ts-ignore
10337
- // @ts-ignore
10338
- // @ts-ignore
10339
- // @ts-ignore
10340
- // @ts-ignore
10341
- // @ts-ignore
10342
- // @ts-ignore
10343
9691
  type WebDriverConfig = {
10344
9692
  url: string;
10345
9693
  browser: string;
@@ -12398,10 +11746,33 @@ declare namespace CodeceptJS {
12398
11746
  [key: string]: any;
12399
11747
  };
12400
11748
  }
11749
+ /**
11750
+ * Result of the test run
11751
+ */
11752
+ type Stats = {
11753
+ passes: number;
11754
+ failures: number;
11755
+ tests: number;
11756
+ pending: number;
11757
+ failedHooks: number;
11758
+ start: Date;
11759
+ end: Date;
11760
+ duration: number;
11761
+ };
11762
+ /**
11763
+ * Create Result of the test run
11764
+ */
11765
+ class Result {
11766
+ constructor();
11767
+ }
12401
11768
  /**
12402
11769
  * Dependency Injection Container
12403
11770
  */
12404
11771
  class Container {
11772
+ /**
11773
+ * Get the standard acting helpers of CodeceptJS Container
11774
+ */
11775
+ static STANDARD_ACTING_HELPERS: any;
12405
11776
  /**
12406
11777
  * Create container with all required helpers and support objects
12407
11778
  */
@@ -12426,6 +11797,10 @@ declare namespace CodeceptJS {
12426
11797
  * Get Mocha instance
12427
11798
  */
12428
11799
  static mocha(): any;
11800
+ /**
11801
+ * Get result
11802
+ */
11803
+ static result(): Result;
12429
11804
  /**
12430
11805
  * Append new services to container
12431
11806
  */
@@ -12442,7 +11817,7 @@ declare namespace CodeceptJS {
12442
11817
  }, newPlugins: {
12443
11818
  [key: string]: any;
12444
11819
  }): void;
12445
- static started(fn: (...params: any[]) => any): Promise<void>;
11820
+ static started(fn: ((...params: any[]) => any) | null): Promise<void>;
12446
11821
  /**
12447
11822
  * Share data across worker threads
12448
11823
  * @param options - set {local: true} to not share among workers
@@ -12508,6 +11883,8 @@ declare namespace CodeceptJS {
12508
11883
  const hook: {
12509
11884
  started: 'hook.start';
12510
11885
  passed: 'hook.passed';
11886
+ failed: 'hook.failed';
11887
+ finished: 'hook.finished';
12511
11888
  };
12512
11889
  const step: {
12513
11890
  started: 'step.start';
@@ -12811,12 +12188,13 @@ declare namespace CodeceptJS {
12811
12188
  args: any[];
12812
12189
  opts: Record<string, any>;
12813
12190
  actor: string;
12814
- helperMethod: string;
12815
12191
  status: string;
12816
12192
  prefix: string;
12817
12193
  comment: string;
12818
12194
  metaStep: any;
12819
12195
  stack: string;
12196
+ helper: any;
12197
+ helperMethod: string;
12820
12198
  timeout: any;
12821
12199
  /**
12822
12200
  * @param timeout - timeout in milliseconds or 0 if no timeout
@@ -12839,12 +12217,30 @@ declare namespace CodeceptJS {
12839
12217
  * global values for current session
12840
12218
  */
12841
12219
  namespace store {
12220
+ /**
12221
+ * If we are in --debug mode
12222
+ */
12842
12223
  var debugMode: boolean;
12224
+ /**
12225
+ * Is timeouts enabled
12226
+ */
12843
12227
  var timeouts: boolean;
12228
+ /**
12229
+ * If auto-retries are enabled by retryFailedStep plugin
12230
+ * tryTo effect disables them
12231
+ */
12232
+ var autoRetries: boolean;
12233
+ /**
12234
+ * Tests are executed via dry-run
12235
+ */
12844
12236
  var dryRun: boolean;
12237
+ /**
12238
+ * If we are in pause mode
12239
+ */
12845
12240
  var onPause: boolean;
12846
12241
  var currentTest: CodeceptJS.Test | null;
12847
- var currentStep: any;
12242
+ var currentStep: CodeceptJS.Step | null;
12243
+ var currentSuite: CodeceptJS.Suite | null;
12848
12244
  }
12849
12245
  /**
12850
12246
  * Describe a "suite" with the given `title`
@@ -12944,6 +12340,49 @@ declare namespace CodeceptJS {
12944
12340
  }): this;
12945
12341
  }
12946
12342
  function addStep(step: any, fn: any): void;
12343
+ /**
12344
+ * Creates a new Hook instance
12345
+ * @property suite - The test suite this hook belongs to
12346
+ * @property test - The test object associated with this hook
12347
+ * @property runnable - The current test being executed
12348
+ * @property ctx - The context object
12349
+ * @property err - The error that occurred during hook execution, if any
12350
+ * @param context - The context object containing suite and test information
12351
+ * @param context.suite - The test suite
12352
+ * @param context.test - The test object
12353
+ * @param context.ctx - The context object
12354
+ * @param error - The error object if hook execution failed
12355
+ */
12356
+ class Hook {
12357
+ constructor(context: {
12358
+ suite: any;
12359
+ test: any;
12360
+ ctx: any;
12361
+ }, error: Error);
12362
+ /**
12363
+ * The test suite this hook belongs to
12364
+ */
12365
+ suite: any;
12366
+ /**
12367
+ * The test object associated with this hook
12368
+ */
12369
+ test: any;
12370
+ /**
12371
+ * The current test being executed
12372
+ */
12373
+ runnable: any;
12374
+ /**
12375
+ * The context object
12376
+ */
12377
+ ctx: any;
12378
+ /**
12379
+ * The error that occurred during hook execution, if any
12380
+ */
12381
+ err: Error | null;
12382
+ }
12383
+ /**
12384
+ * TODO: move to effects
12385
+ */
12947
12386
  function within(context: CodeceptJS.LocatorOrString, fn: (...params: any[]) => any): Promise<any> | undefined;
12948
12387
  /**
12949
12388
  * This is a wrapper on top of [Detox](https://github.com/wix/Detox) library, aimied to unify testing experience for CodeceptJS framework.
@@ -13554,3 +12993,8 @@ declare var helper: CodeceptJS.Helper;
13554
12993
  */
13555
12994
  declare var helperMethod: string;
13556
12995
 
12996
+ /**
12997
+ * hide children steps from output
12998
+ */
12999
+ declare var collsapsed: boolean;
13000
+