codeceptjs 3.6.10 → 3.7.0-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.
Files changed (105) hide show
  1. package/README.md +81 -110
  2. package/bin/codecept.js +2 -2
  3. package/docs/webapi/clearCookie.mustache +1 -1
  4. package/lib/actor.js +46 -36
  5. package/lib/assert/empty.js +3 -5
  6. package/lib/assert/equal.js +4 -7
  7. package/lib/assert/include.js +4 -6
  8. package/lib/assert/throws.js +2 -4
  9. package/lib/assert/truth.js +2 -2
  10. package/lib/codecept.js +87 -83
  11. package/lib/command/configMigrate.js +2 -4
  12. package/lib/command/definitions.js +5 -25
  13. package/lib/command/generate.js +10 -14
  14. package/lib/command/gherkin/snippets.js +10 -8
  15. package/lib/command/gherkin/steps.js +1 -1
  16. package/lib/command/info.js +1 -3
  17. package/lib/command/init.js +8 -12
  18. package/lib/command/interactive.js +1 -1
  19. package/lib/command/list.js +1 -1
  20. package/lib/command/run-multiple.js +12 -35
  21. package/lib/command/run-workers.js +10 -10
  22. package/lib/command/utils.js +5 -6
  23. package/lib/command/workers/runTests.js +14 -17
  24. package/lib/container.js +327 -237
  25. package/lib/data/context.js +10 -13
  26. package/lib/data/dataScenarioConfig.js +8 -8
  27. package/lib/data/dataTableArgument.js +6 -6
  28. package/lib/data/table.js +5 -11
  29. package/lib/els.js +177 -0
  30. package/lib/event.js +1 -0
  31. package/lib/heal.js +78 -80
  32. package/lib/helper/ApiDataFactory.js +3 -6
  33. package/lib/helper/Appium.js +15 -30
  34. package/lib/helper/FileSystem.js +3 -3
  35. package/lib/helper/GraphQLDataFactory.js +3 -3
  36. package/lib/helper/JSONResponse.js +57 -37
  37. package/lib/helper/Nightmare.js +35 -53
  38. package/lib/helper/Playwright.js +189 -251
  39. package/lib/helper/Protractor.js +54 -77
  40. package/lib/helper/Puppeteer.js +134 -232
  41. package/lib/helper/REST.js +5 -17
  42. package/lib/helper/TestCafe.js +21 -44
  43. package/lib/helper/WebDriver.js +103 -162
  44. package/lib/helper/testcafe/testcafe-utils.js +26 -27
  45. package/lib/listener/artifacts.js +2 -2
  46. package/lib/listener/emptyRun.js +58 -0
  47. package/lib/listener/exit.js +4 -4
  48. package/lib/listener/{retry.js → globalRetry.js} +5 -5
  49. package/lib/listener/{timeout.js → globalTimeout.js} +9 -8
  50. package/lib/listener/helpers.js +15 -15
  51. package/lib/listener/mocha.js +1 -1
  52. package/lib/listener/steps.js +17 -12
  53. package/lib/listener/store.js +12 -0
  54. package/lib/mocha/asyncWrapper.js +204 -0
  55. package/lib/{interfaces → mocha}/bdd.js +3 -3
  56. package/lib/mocha/cli.js +257 -0
  57. package/lib/mocha/factory.js +104 -0
  58. package/lib/{interfaces → mocha}/featureConfig.js +11 -12
  59. package/lib/{interfaces → mocha}/gherkin.js +26 -28
  60. package/lib/mocha/hooks.js +83 -0
  61. package/lib/mocha/index.js +12 -0
  62. package/lib/mocha/inject.js +24 -0
  63. package/lib/{interfaces → mocha}/scenarioConfig.js +10 -6
  64. package/lib/mocha/suite.js +55 -0
  65. package/lib/mocha/test.js +60 -0
  66. package/lib/mocha/types.d.ts +31 -0
  67. package/lib/mocha/ui.js +219 -0
  68. package/lib/output.js +28 -10
  69. package/lib/pause.js +159 -135
  70. package/lib/plugin/autoDelay.js +4 -4
  71. package/lib/plugin/autoLogin.js +6 -7
  72. package/lib/plugin/commentStep.js +1 -1
  73. package/lib/plugin/coverage.js +10 -19
  74. package/lib/plugin/customLocator.js +3 -3
  75. package/lib/plugin/debugErrors.js +2 -2
  76. package/lib/plugin/eachElement.js +1 -1
  77. package/lib/plugin/fakerTransform.js +1 -1
  78. package/lib/plugin/heal.js +6 -9
  79. package/lib/plugin/retryFailedStep.js +4 -4
  80. package/lib/plugin/retryTo.js +2 -2
  81. package/lib/plugin/screenshotOnFail.js +9 -36
  82. package/lib/plugin/selenoid.js +15 -35
  83. package/lib/plugin/stepByStepReport.js +51 -13
  84. package/lib/plugin/stepTimeout.js +4 -11
  85. package/lib/plugin/subtitles.js +4 -4
  86. package/lib/plugin/tryTo.js +1 -1
  87. package/lib/plugin/wdio.js +8 -10
  88. package/lib/recorder.js +142 -121
  89. package/lib/secret.js +1 -1
  90. package/lib/step.js +160 -144
  91. package/lib/store.js +6 -2
  92. package/lib/template/heal.js +2 -11
  93. package/lib/utils.js +224 -216
  94. package/lib/within.js +73 -55
  95. package/lib/workers.js +265 -261
  96. package/package.json +46 -47
  97. package/typings/index.d.ts +172 -184
  98. package/typings/promiseBasedTypes.d.ts +95 -516
  99. package/typings/types.d.ts +169 -587
  100. package/lib/cli.js +0 -256
  101. package/lib/helper/ExpectHelper.js +0 -391
  102. package/lib/helper/SoftExpectHelper.js +0 -381
  103. package/lib/mochaFactory.js +0 -113
  104. package/lib/scenario.js +0 -224
  105. package/lib/ui.js +0 -236
@@ -1209,228 +1209,6 @@ declare namespace CodeceptJS {
1209
1209
  */
1210
1210
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
1211
1211
  }
1212
- /**
1213
- * This helper allows performing assertions based on Chai.
1214
- *
1215
- * ### Examples
1216
- *
1217
- * Zero-configuration when paired with other helpers like REST, Playwright:
1218
- *
1219
- * ```js
1220
- * // inside codecept.conf.js
1221
- * {
1222
- * helpers: {
1223
- * Playwright: {...},
1224
- * ExpectHelper: {},
1225
- * }
1226
- * }
1227
- * ```
1228
- *
1229
- * ## Methods
1230
- */
1231
- class ExpectHelper {
1232
- expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1233
- expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1234
- expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1235
- expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1236
- expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): void;
1237
- expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): void;
1238
- expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): void;
1239
- expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): void;
1240
- expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): void;
1241
- expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): void;
1242
- expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): void;
1243
- /**
1244
- * @param [ajvOptions] - Pass AJV options
1245
- */
1246
- expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): void;
1247
- expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1248
- expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1249
- expectToBeA(targetData: any, type: any, customErrorMsg?: any): void;
1250
- expectToBeAn(targetData: any, type: any, customErrorMsg?: any): void;
1251
- expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): void;
1252
- expectLengthOf(targetData: any, length: any, customErrorMsg?: any): void;
1253
- expectEmpty(targetData: any, customErrorMsg?: any): void;
1254
- expectTrue(targetData: any, customErrorMsg?: any): void;
1255
- expectFalse(targetData: any, customErrorMsg?: any): void;
1256
- expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): void;
1257
- expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): void;
1258
- expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): void;
1259
- expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): void;
1260
- expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1261
- /**
1262
- * expects members of two arrays are deeply equal
1263
- */
1264
- expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1265
- /**
1266
- * expects an array to be a superset of another array
1267
- */
1268
- expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): void;
1269
- /**
1270
- * expects members of two JSON objects are deeply equal excluding some properties
1271
- */
1272
- expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): void;
1273
- /**
1274
- * expects a JSON object matches a provided pattern
1275
- */
1276
- expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): void;
1277
- expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1278
- expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1279
- expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1280
- expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1281
- expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): void;
1282
- expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): void;
1283
- expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): void;
1284
- expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): void;
1285
- expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): void;
1286
- expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): void;
1287
- expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): void;
1288
- /**
1289
- * @param [ajvOptions] - Pass AJV options
1290
- */
1291
- expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): void;
1292
- expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1293
- expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1294
- expectToBeA(targetData: any, type: any, customErrorMsg?: any): void;
1295
- expectToBeAn(targetData: any, type: any, customErrorMsg?: any): void;
1296
- expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): void;
1297
- expectLengthOf(targetData: any, length: any, customErrorMsg?: any): void;
1298
- expectEmpty(targetData: any, customErrorMsg?: any): void;
1299
- expectTrue(targetData: any, customErrorMsg?: any): void;
1300
- expectFalse(targetData: any, customErrorMsg?: any): void;
1301
- expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): void;
1302
- expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): void;
1303
- expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): void;
1304
- expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): void;
1305
- expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1306
- /**
1307
- * expects members of two arrays are deeply equal
1308
- */
1309
- expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1310
- /**
1311
- * expects an array to be a superset of another array
1312
- */
1313
- expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): void;
1314
- /**
1315
- * expects members of two JSON objects are deeply equal excluding some properties
1316
- */
1317
- expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): void;
1318
- /**
1319
- * expects a JSON object matches a provided pattern
1320
- */
1321
- expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): void;
1322
- }
1323
- /**
1324
- * This helper allows performing assertions based on Chai.
1325
- *
1326
- * ### Examples
1327
- *
1328
- * Zero-configuration when paired with other helpers like REST, Playwright:
1329
- *
1330
- * ```js
1331
- * // inside codecept.conf.js
1332
- * {
1333
- * helpers: {
1334
- * Playwright: {...},
1335
- * ExpectHelper: {},
1336
- * }
1337
- * }
1338
- * ```
1339
- *
1340
- * ## Methods
1341
- */
1342
- class ExpectHelper {
1343
- expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1344
- expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1345
- expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1346
- expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1347
- expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): void;
1348
- expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): void;
1349
- expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): void;
1350
- expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): void;
1351
- expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): void;
1352
- expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): void;
1353
- expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): void;
1354
- /**
1355
- * @param [ajvOptions] - Pass AJV options
1356
- */
1357
- expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): void;
1358
- expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1359
- expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1360
- expectToBeA(targetData: any, type: any, customErrorMsg?: any): void;
1361
- expectToBeAn(targetData: any, type: any, customErrorMsg?: any): void;
1362
- expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): void;
1363
- expectLengthOf(targetData: any, length: any, customErrorMsg?: any): void;
1364
- expectEmpty(targetData: any, customErrorMsg?: any): void;
1365
- expectTrue(targetData: any, customErrorMsg?: any): void;
1366
- expectFalse(targetData: any, customErrorMsg?: any): void;
1367
- expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): void;
1368
- expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): void;
1369
- expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): void;
1370
- expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): void;
1371
- expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1372
- /**
1373
- * expects members of two arrays are deeply equal
1374
- */
1375
- expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1376
- /**
1377
- * expects an array to be a superset of another array
1378
- */
1379
- expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): void;
1380
- /**
1381
- * expects members of two JSON objects are deeply equal excluding some properties
1382
- */
1383
- expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): void;
1384
- /**
1385
- * expects a JSON object matches a provided pattern
1386
- */
1387
- expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): void;
1388
- expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1389
- expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1390
- expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1391
- expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1392
- expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): void;
1393
- expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): void;
1394
- expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): void;
1395
- expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): void;
1396
- expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): void;
1397
- expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): void;
1398
- expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): void;
1399
- /**
1400
- * @param [ajvOptions] - Pass AJV options
1401
- */
1402
- expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): void;
1403
- expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1404
- expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
1405
- expectToBeA(targetData: any, type: any, customErrorMsg?: any): void;
1406
- expectToBeAn(targetData: any, type: any, customErrorMsg?: any): void;
1407
- expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): void;
1408
- expectLengthOf(targetData: any, length: any, customErrorMsg?: any): void;
1409
- expectEmpty(targetData: any, customErrorMsg?: any): void;
1410
- expectTrue(targetData: any, customErrorMsg?: any): void;
1411
- expectFalse(targetData: any, customErrorMsg?: any): void;
1412
- expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): void;
1413
- expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): void;
1414
- expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): void;
1415
- expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): void;
1416
- expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1417
- /**
1418
- * expects members of two arrays are deeply equal
1419
- */
1420
- expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1421
- /**
1422
- * expects an array to be a superset of another array
1423
- */
1424
- expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): void;
1425
- /**
1426
- * expects members of two JSON objects are deeply equal excluding some properties
1427
- */
1428
- expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): void;
1429
- /**
1430
- * expects a JSON object matches a provided pattern
1431
- */
1432
- expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): void;
1433
- }
1434
1212
  /**
1435
1213
  * Helper for testing filesystem.
1436
1214
  * Can be easily used to check file structures:
@@ -1957,13 +1735,14 @@ declare namespace CodeceptJS {
1957
1735
  */
1958
1736
  seeResponseContainsKeys(keys: any[]): void;
1959
1737
  /**
1960
- * Executes a callback function passing in `response` object and chai assertions with `expect`
1738
+ * Executes a callback function passing in `response` object and assert
1961
1739
  * Use it to perform custom checks of response data
1962
1740
  *
1963
1741
  * ```js
1964
- * I.seeResponseValidByCallback(({ data, status, expect }) => {
1965
- * expect(status).to.eql(200);
1966
- * expect(data).keys.to.include(['user', 'company']);
1742
+ * I.seeResponseValidByCallback(({ data, status }) => {
1743
+ * assert.strictEqual(status, 200);
1744
+ * assert('user' in data);
1745
+ * assert('company' in data);
1967
1746
  * });
1968
1747
  * ```
1969
1748
  */
@@ -2013,6 +1792,20 @@ declare namespace CodeceptJS {
2013
1792
  * @property [host = "0.0.0.0"] - Mock server host
2014
1793
  * @property [httpsOpts] - key & cert values are the paths to .key and .crt files
2015
1794
  */
1795
+ // @ts-ignore
1796
+ // @ts-ignore
1797
+ // @ts-ignore
1798
+ // @ts-ignore
1799
+ // @ts-ignore
1800
+ // @ts-ignore
1801
+ // @ts-ignore
1802
+ // @ts-ignore
1803
+ // @ts-ignore
1804
+ // @ts-ignore
1805
+ // @ts-ignore
1806
+ // @ts-ignore
1807
+ // @ts-ignore
1808
+ // @ts-ignore
2016
1809
  type MockServerConfig = {
2017
1810
  port?: number;
2018
1811
  host?: string;
@@ -2137,6 +1930,20 @@ declare namespace CodeceptJS {
2137
1930
  *
2138
1931
  * ## Methods
2139
1932
  */
1933
+ // @ts-ignore
1934
+ // @ts-ignore
1935
+ // @ts-ignore
1936
+ // @ts-ignore
1937
+ // @ts-ignore
1938
+ // @ts-ignore
1939
+ // @ts-ignore
1940
+ // @ts-ignore
1941
+ // @ts-ignore
1942
+ // @ts-ignore
1943
+ // @ts-ignore
1944
+ // @ts-ignore
1945
+ // @ts-ignore
1946
+ // @ts-ignore
2140
1947
  class MockServer {
2141
1948
  /**
2142
1949
  * Start the mock server
@@ -2977,7 +2784,7 @@ declare namespace CodeceptJS {
2977
2784
  *
2978
2785
  * ```js
2979
2786
  * I.clearCookie();
2980
- * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
2787
+ * I.clearCookie('test');
2981
2788
  * ```
2982
2789
  * @param [cookie = null] - (optional, `null` by default) cookie name
2983
2790
  */
@@ -3192,46 +2999,6 @@ declare namespace CodeceptJS {
3192
2999
  */
3193
3000
  grabPageScrollPosition(): Promise<PageScrollPosition>;
3194
3001
  }
3195
- /**
3196
- * OpenAI Helper for CodeceptJS.
3197
- *
3198
- * 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.
3199
- * This helper should be enabled with any web helpers like Playwright or Puppeteer or WebDrvier to ensure the HTML context is available.
3200
- *
3201
- * ## Configuration
3202
- *
3203
- * This helper should be configured in codecept.json or codecept.conf.js
3204
- *
3205
- * * `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.
3206
- */
3207
- class OpenAI {
3208
- /**
3209
- * Asks the OpenAI GPT language model a question based on the provided prompt within the context of the current page's HTML.
3210
- *
3211
- * ```js
3212
- * I.askGptOnPage('what does this page do?');
3213
- * ```
3214
- * @param prompt - The question or prompt to ask the GPT model.
3215
- * @returns - A Promise that resolves to the generated responses from the GPT model, joined by newlines.
3216
- */
3217
- askGptOnPage(prompt: string): Promise<string>;
3218
- /**
3219
- * 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.
3220
- *
3221
- * ```js
3222
- * I.askGptOnPageFragment('describe features of this screen', '.screen');
3223
- * ```
3224
- * @param prompt - The question or prompt to ask the GPT-3.5 model.
3225
- * @param locator - The locator or selector used to identify the HTML fragment on the page.
3226
- * @returns - A Promise that resolves to the generated response from the GPT model.
3227
- */
3228
- askGptOnPageFragment(prompt: string, locator: string): Promise<string>;
3229
- /**
3230
- * Send a general request to ChatGPT and return response.
3231
- * @returns - A Promise that resolves to the generated response from the GPT model.
3232
- */
3233
- askGptGeneralPrompt(prompt: string): Promise<string>;
3234
- }
3235
3002
  /**
3236
3003
  * ## Configuration
3237
3004
  *
@@ -3276,6 +3043,20 @@ declare namespace CodeceptJS {
3276
3043
  * @property [recordHar] - record HAR and will be saved to `output/har`. See more of [HAR options](https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-har).
3277
3044
  * @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).
3278
3045
  */
3046
+ // @ts-ignore
3047
+ // @ts-ignore
3048
+ // @ts-ignore
3049
+ // @ts-ignore
3050
+ // @ts-ignore
3051
+ // @ts-ignore
3052
+ // @ts-ignore
3053
+ // @ts-ignore
3054
+ // @ts-ignore
3055
+ // @ts-ignore
3056
+ // @ts-ignore
3057
+ // @ts-ignore
3058
+ // @ts-ignore
3059
+ // @ts-ignore
3279
3060
  type PlaywrightConfig = {
3280
3061
  url?: string;
3281
3062
  browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
@@ -4681,7 +4462,7 @@ declare namespace CodeceptJS {
4681
4462
  *
4682
4463
  * ```js
4683
4464
  * I.clearCookie();
4684
- * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
4465
+ * I.clearCookie('test');
4685
4466
  * ```
4686
4467
  * @param [cookie = null] - (optional, `null` by default) cookie name
4687
4468
  */
@@ -6354,7 +6135,7 @@ declare namespace CodeceptJS {
6354
6135
  *
6355
6136
  * ```js
6356
6137
  * I.clearCookie();
6357
- * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
6138
+ * I.clearCookie('test');
6358
6139
  * ```
6359
6140
  * @param [cookie = null] - (optional, `null` by default) cookie name
6360
6141
  */
@@ -6803,6 +6584,20 @@ declare namespace CodeceptJS {
6803
6584
  * @property [chrome] - pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
6804
6585
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
6805
6586
  */
6587
+ // @ts-ignore
6588
+ // @ts-ignore
6589
+ // @ts-ignore
6590
+ // @ts-ignore
6591
+ // @ts-ignore
6592
+ // @ts-ignore
6593
+ // @ts-ignore
6594
+ // @ts-ignore
6595
+ // @ts-ignore
6596
+ // @ts-ignore
6597
+ // @ts-ignore
6598
+ // @ts-ignore
6599
+ // @ts-ignore
6600
+ // @ts-ignore
6806
6601
  type PuppeteerConfig = {
6807
6602
  url: string;
6808
6603
  basicAuth?: any;
@@ -8051,7 +7846,7 @@ declare namespace CodeceptJS {
8051
7846
  *
8052
7847
  * ```js
8053
7848
  * I.clearCookie();
8054
- * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
7849
+ * I.clearCookie('test');
8055
7850
  * ```
8056
7851
  * @param [cookie = null] - (optional, `null` by default) cookie name
8057
7852
  */
@@ -8745,6 +8540,20 @@ declare namespace CodeceptJS {
8745
8540
  * @property [onResponse] - an async function which can update response object.
8746
8541
  * @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
8747
8542
  */
8543
+ // @ts-ignore
8544
+ // @ts-ignore
8545
+ // @ts-ignore
8546
+ // @ts-ignore
8547
+ // @ts-ignore
8548
+ // @ts-ignore
8549
+ // @ts-ignore
8550
+ // @ts-ignore
8551
+ // @ts-ignore
8552
+ // @ts-ignore
8553
+ // @ts-ignore
8554
+ // @ts-ignore
8555
+ // @ts-ignore
8556
+ // @ts-ignore
8748
8557
  type RESTConfig = {
8749
8558
  endpoint?: string;
8750
8559
  prettyPrintJson?: boolean;
@@ -8937,250 +8746,6 @@ declare namespace CodeceptJS {
8937
8746
  */
8938
8747
  sendDeleteRequestWithPayload(url: any, payload?: any, headers?: any): Promise<any>;
8939
8748
  }
8940
- /**
8941
- * SoftAssertHelper is a utility class for performing soft assertions.
8942
- * Unlike traditional assertions that stop the execution on failure,
8943
- * soft assertions allow the execution to continue and report all failures at the end.
8944
- *
8945
- * ### Examples
8946
- *
8947
- * Zero-configuration when paired with other helpers like REST, Playwright:
8948
- *
8949
- * ```js
8950
- * // inside codecept.conf.js
8951
- * {
8952
- * helpers: {
8953
- * Playwright: {...},
8954
- * SoftExpectHelper: {},
8955
- * }
8956
- * }
8957
- * ```
8958
- *
8959
- * ```js
8960
- * // in scenario
8961
- * I.softExpectEqual('a', 'b')
8962
- * I.flushSoftAssertions() // Throws an error if any soft assertions have failed. The error message contains all the accumulated failures.
8963
- * ```
8964
- *
8965
- * ## Methods
8966
- */
8967
- class SoftAssertHelper {
8968
- /**
8969
- * Performs a soft assertion by executing the provided assertion function.
8970
- * If the assertion fails, the error is caught and stored without halting the execution.
8971
- * @param assertionFn - The assertion function to execute.
8972
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
8973
- */
8974
- softAssert(assertionFn: (...params: any[]) => any, customErrorMsg?: string): void;
8975
- /**
8976
- * Throws an error if any soft assertions have failed.
8977
- * The error message contains all the accumulated failures.
8978
- */
8979
- flushSoftAssertions(): void;
8980
- /**
8981
- * Softly asserts that two values are equal.
8982
- * @param actualValue - The actual value.
8983
- * @param expectedValue - The expected value.
8984
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
8985
- */
8986
- softExpectEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
8987
- /**
8988
- * Softly asserts that two values are not equal.
8989
- * @param actualValue - The actual value.
8990
- * @param expectedValue - The expected value.
8991
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
8992
- */
8993
- softExpectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
8994
- /**
8995
- * Softly asserts that two values are deeply equal.
8996
- * @param actualValue - The actual value.
8997
- * @param expectedValue - The expected value.
8998
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
8999
- */
9000
- softExpectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
9001
- /**
9002
- * Softly asserts that two values are not deeply equal.
9003
- * @param actualValue - The actual value.
9004
- * @param expectedValue - The expected value.
9005
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9006
- */
9007
- softExpectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
9008
- /**
9009
- * Softly asserts that a value contains the expected value.
9010
- * @param actualValue - The actual value.
9011
- * @param expectedValueToContain - The value that should be contained within the actual value.
9012
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9013
- */
9014
- softExpectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: string): void;
9015
- /**
9016
- * Softly asserts that a value does not contain the expected value.
9017
- * @param actualValue - The actual value.
9018
- * @param expectedValueToNotContain - The value that should not be contained within the actual value.
9019
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9020
- */
9021
- softExpectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: string): void;
9022
- /**
9023
- * Softly asserts that a value starts with the expected value.
9024
- * @param actualValue - The actual value.
9025
- * @param expectedValueToStartWith - The value that the actual value should start with.
9026
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9027
- */
9028
- softExpectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: string): void;
9029
- /**
9030
- * Softly asserts that a value does not start with the expected value.
9031
- * @param actualValue - The actual value.
9032
- * @param expectedValueToNotStartWith - The value that the actual value should not start with.
9033
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9034
- */
9035
- softExpectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: string): void;
9036
- /**
9037
- * Softly asserts that a value ends with the expected value.
9038
- * @param actualValue - The actual value.
9039
- * @param expectedValueToEndWith - The value that the actual value should end with.
9040
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9041
- */
9042
- softExpectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: string): void;
9043
- /**
9044
- * Softly asserts that a value does not end with the expected value.
9045
- * @param actualValue - The actual value.
9046
- * @param expectedValueToNotEndWith - The value that the actual value should not end with.
9047
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9048
- */
9049
- softExpectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: string): void;
9050
- /**
9051
- * Softly asserts that the target data matches the given JSON schema.
9052
- * @param targetData - The data to validate.
9053
- * @param jsonSchema - The JSON schema to validate against.
9054
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9055
- */
9056
- softExpectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: string): void;
9057
- /**
9058
- * Softly asserts that the target data matches the given JSON schema using AJV.
9059
- * @param targetData - The data to validate.
9060
- * @param jsonSchema - The JSON schema to validate against.
9061
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9062
- * @param [ajvOptions = { allErrors: true }] - Options to pass to AJV.
9063
- */
9064
- softExpectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: string, ajvOptions?: any): void;
9065
- /**
9066
- * Softly asserts that the target data has the specified property.
9067
- * @param targetData - The data to check.
9068
- * @param propertyName - The property name to check for.
9069
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion
9070
- * fails.
9071
- */
9072
- softExpectHasProperty(targetData: any, propertyName: string, customErrorMsg?: string): void;
9073
- /**
9074
- * Softly asserts that the target data has a property with the specified name.
9075
- * @param targetData - The data to check.
9076
- * @param propertyName - The property name to check for.
9077
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9078
- */
9079
- softExpectHasAProperty(targetData: any, propertyName: string, customErrorMsg?: string): void;
9080
- /**
9081
- * Softly asserts that the target data is of a specific type.
9082
- * @param targetData - The data to check.
9083
- * @param type - The expected type (e.g., 'string', 'number').
9084
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9085
- */
9086
- softExpectToBeA(targetData: any, type: string, customErrorMsg?: string): void;
9087
- /**
9088
- * Softly asserts that the target data is of a specific type (alternative for articles).
9089
- * @param targetData - The data to check.
9090
- * @param type - The expected type (e.g., 'string', 'number').
9091
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9092
- */
9093
- softExpectToBeAn(targetData: any, type: string, customErrorMsg?: string): void;
9094
- /**
9095
- * Softly asserts that the target data has a specified length.
9096
- * @param targetData - The data to check.
9097
- * @param length - The expected length.
9098
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9099
- */
9100
- softExpectLengthOf(targetData: any, length: number, customErrorMsg?: string): void;
9101
- /**
9102
- * Softly asserts that the target data is empty.
9103
- * @param targetData - The data to check.
9104
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9105
- */
9106
- softExpectEmpty(targetData: any, customErrorMsg?: string): void;
9107
- /**
9108
- * Softly asserts that the target data is true.
9109
- * @param targetData - The data to check.
9110
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9111
- */
9112
- softExpectTrue(targetData: any, customErrorMsg?: string): void;
9113
- /**
9114
- * Softly asserts that the target data is false.
9115
- * @param targetData - The data to check.
9116
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9117
- */
9118
- softExpectFalse(targetData: any, customErrorMsg?: string): void;
9119
- /**
9120
- * Softly asserts that the target data is above a specified value.
9121
- * @param targetData - The data to check.
9122
- * @param aboveThan - The value that the target data should be above.
9123
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9124
- */
9125
- softExpectAbove(targetData: any, aboveThan: any, customErrorMsg?: string): void;
9126
- /**
9127
- * Softly asserts that the target data is below a specified value.
9128
- * @param targetData - The data to check.
9129
- * @param belowThan - The value that the target data should be below.
9130
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9131
- */
9132
- softExpectBelow(targetData: any, belowThan: any, customErrorMsg?: string): void;
9133
- /**
9134
- * Softly asserts that the length of the target data is above a specified value.
9135
- * @param targetData - The data to check.
9136
- * @param lengthAboveThan - The length that the target data should be above.
9137
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9138
- */
9139
- softExpectLengthAboveThan(targetData: any, lengthAboveThan: number, customErrorMsg?: string): void;
9140
- /**
9141
- * Softly asserts that the length of the target data is below a specified value.
9142
- * @param targetData - The data to check.
9143
- * @param lengthBelowThan - The length that the target data should be below.
9144
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9145
- */
9146
- softExpectLengthBelowThan(targetData: any, lengthBelowThan: number, customErrorMsg?: string): void;
9147
- /**
9148
- * Softly asserts that two values are equal, ignoring case.
9149
- * @param actualValue - The actual string value.
9150
- * @param expectedValue - The expected string value.
9151
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9152
- */
9153
- softExpectEqualIgnoreCase(actualValue: string, expectedValue: string, customErrorMsg?: string): void;
9154
- /**
9155
- * Softly asserts that two arrays have deep equality, considering members in any order.
9156
- * @param actualValue - The actual array.
9157
- * @param expectedValue - The expected array.
9158
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9159
- */
9160
- softExpectDeepMembers(actualValue: any[], expectedValue: any[], customErrorMsg?: string): void;
9161
- /**
9162
- * Softly asserts that an array (superset) deeply includes all members of another array (set).
9163
- * @param superset - The array that should contain the expected members.
9164
- * @param set - The array with members that should be included.
9165
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9166
- */
9167
- softExpectDeepIncludeMembers(superset: any[], set: any[], customErrorMsg?: string): void;
9168
- /**
9169
- * Softly asserts that two objects are deeply equal, excluding specified fields.
9170
- * @param actualValue - The actual object.
9171
- * @param expectedValue - The expected object.
9172
- * @param fieldsToExclude - The fields to exclude from the comparison.
9173
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9174
- */
9175
- softExpectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: string[], customErrorMsg?: string): void;
9176
- /**
9177
- * Softly asserts that a value matches the expected pattern.
9178
- * @param actualValue - The actual value.
9179
- * @param expectedPattern - The pattern the value should match.
9180
- * @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
9181
- */
9182
- softExpectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: string): void;
9183
- }
9184
8749
  /**
9185
8750
  * Client Functions
9186
8751
  */
@@ -10055,7 +9620,7 @@ declare namespace CodeceptJS {
10055
9620
  *
10056
9621
  * ```js
10057
9622
  * I.clearCookie();
10058
- * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
9623
+ * I.clearCookie('test');
10059
9624
  * ```
10060
9625
  * @param [cookie = null] - (optional, `null` by default) cookie name
10061
9626
  */
@@ -10193,6 +9758,20 @@ declare namespace CodeceptJS {
10193
9758
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
10194
9759
  * @property [logLevel = silent] - level of logging verbosity. Default: silent. Options: trace | debug | info | warn | error | silent. More info: https://webdriver.io/docs/configuration/#loglevel
10195
9760
  */
9761
+ // @ts-ignore
9762
+ // @ts-ignore
9763
+ // @ts-ignore
9764
+ // @ts-ignore
9765
+ // @ts-ignore
9766
+ // @ts-ignore
9767
+ // @ts-ignore
9768
+ // @ts-ignore
9769
+ // @ts-ignore
9770
+ // @ts-ignore
9771
+ // @ts-ignore
9772
+ // @ts-ignore
9773
+ // @ts-ignore
9774
+ // @ts-ignore
10196
9775
  type WebDriverConfig = {
10197
9776
  url: string;
10198
9777
  browser: string;
@@ -11540,7 +11119,7 @@ declare namespace CodeceptJS {
11540
11119
  *
11541
11120
  * ```js
11542
11121
  * I.clearCookie();
11543
- * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
11122
+ * I.clearCookie('test');
11544
11123
  * ```
11545
11124
  * @param [cookie = null] - (optional, `null` by default) cookie name
11546
11125
  */
@@ -12295,6 +11874,7 @@ declare namespace CodeceptJS {
12295
11874
  }, newPlugins: {
12296
11875
  [key: string]: any;
12297
11876
  }): void;
11877
+ static started(fn: (...params: any[]) => any): Promise<void>;
12298
11878
  /**
12299
11879
  * Share data across worker threads
12300
11880
  * @param options - set {local: true} to not share among workers
@@ -12304,7 +11884,7 @@ declare namespace CodeceptJS {
12304
11884
  /**
12305
11885
  * Method collect own property and prototype
12306
11886
  */
12307
- function getObjectMethods(): void;
11887
+ function loadTranslation(): void;
12308
11888
  /**
12309
11889
  * Datatable class to provide data driven testing
12310
11890
  */
@@ -12418,76 +11998,6 @@ declare namespace CodeceptJS {
12418
11998
  var store: typeof CodeceptJS.store;
12419
11999
  var locator: typeof CodeceptJS.Locator;
12420
12000
  }
12421
- function addStep(step: any, fn: any): void;
12422
- class FeatureConfig {
12423
- /**
12424
- * Retry this suite for x times
12425
- */
12426
- retry(retries: number): this;
12427
- /**
12428
- * Set timeout for this suite
12429
- */
12430
- timeout(timeout: number): this;
12431
- /**
12432
- * Configures a helper.
12433
- * Helper name can be omitted and values will be applied to first helper.
12434
- */
12435
- config(helper: string | {
12436
- [key: string]: any;
12437
- }, obj?: {
12438
- [key: string]: any;
12439
- }): this;
12440
- /**
12441
- * Append a tag name to scenario title
12442
- */
12443
- tag(tagName: string): this;
12444
- }
12445
- class ScenarioConfig {
12446
- /**
12447
- * Declares that test throws error.
12448
- * Can pass an Error object or regex matching expected message.
12449
- */
12450
- throws(err: any): this;
12451
- /**
12452
- * Declares that test should fail.
12453
- * If test passes - throws an error.
12454
- * Can pass an Error object or regex matching expected message.
12455
- */
12456
- fails(): this;
12457
- /**
12458
- * Retry this test for x times
12459
- */
12460
- retry(retries: number): this;
12461
- /**
12462
- * Set timeout for this test
12463
- */
12464
- timeout(timeout: number): this;
12465
- /**
12466
- * Pass in additional objects to inject into test
12467
- */
12468
- inject(obj: {
12469
- [key: string]: any;
12470
- }): this;
12471
- /**
12472
- * Configures a helper.
12473
- * Helper name can be omitted and values will be applied to first helper.
12474
- */
12475
- config(helper: string | {
12476
- [key: string]: any;
12477
- }, obj?: {
12478
- [key: string]: any;
12479
- }): this;
12480
- /**
12481
- * Append a tag name to scenario title
12482
- */
12483
- tag(tagName: string): this;
12484
- /**
12485
- * Dynamically injects dependencies, see https://codecept.io/pageobjects/#dynamic-injection
12486
- */
12487
- injectDependencies(dependencies: {
12488
- [key: string]: any;
12489
- }): this;
12490
- }
12491
12001
  class Locator {
12492
12002
  constructor(locator: CodeceptJS.LocatorOrString, defaultType?: string);
12493
12003
  toString(): string;
@@ -12729,6 +12239,7 @@ declare namespace CodeceptJS {
12729
12239
  humanizeArgs(): string;
12730
12240
  line(): string;
12731
12241
  toString(): string;
12242
+ toCliStyled(): string;
12732
12243
  toCode(): string;
12733
12244
  hasBDDAncestor(): boolean;
12734
12245
  static MetaStep: typeof MetaStep;
@@ -12744,6 +12255,7 @@ declare namespace CodeceptJS {
12744
12255
  var debugMode: boolean;
12745
12256
  var timeouts: boolean;
12746
12257
  var dryRun: boolean;
12258
+ var currentTest: CodeceptJS.Test | null;
12747
12259
  }
12748
12260
  /**
12749
12261
  * Describe a "suite" with the given `title`
@@ -12765,6 +12277,76 @@ declare namespace CodeceptJS {
12765
12277
  * Pending test case with message: 'Test not implemented!'.
12766
12278
  */
12767
12279
  const todo: CodeceptJS.IScenario;
12280
+ /**
12281
+ * Configuration for a Feature.
12282
+ * Can inject values and add custom configuration.
12283
+ */
12284
+ class FeatureConfig {
12285
+ /**
12286
+ * Retry this test for number of times
12287
+ */
12288
+ retry(retries: number): this;
12289
+ /**
12290
+ * Set timeout for this test
12291
+ */
12292
+ timeout(timeout: number): this;
12293
+ /**
12294
+ * Configures a helper.
12295
+ * Helper name can be omitted and values will be applied to first helper.
12296
+ */
12297
+ config(helper: string | number, obj: any): this;
12298
+ /**
12299
+ * Append a tag name to scenario title
12300
+ */
12301
+ tag(tagName: string): this;
12302
+ }
12303
+ class ScenarioConfig {
12304
+ /**
12305
+ * Declares that test throws error.
12306
+ * Can pass an Error object or regex matching expected message.
12307
+ */
12308
+ throws(err: any): this;
12309
+ /**
12310
+ * Declares that test should fail.
12311
+ * If test passes - throws an error.
12312
+ * Can pass an Error object or regex matching expected message.
12313
+ */
12314
+ fails(): this;
12315
+ /**
12316
+ * Retry this test for x times
12317
+ */
12318
+ retry(retries: number): this;
12319
+ /**
12320
+ * Set timeout for this test
12321
+ */
12322
+ timeout(timeout: number): this;
12323
+ /**
12324
+ * Pass in additional objects to inject into test
12325
+ */
12326
+ inject(obj: {
12327
+ [key: string]: any;
12328
+ }): this;
12329
+ /**
12330
+ * Configures a helper.
12331
+ * Helper name can be omitted and values will be applied to first helper.
12332
+ */
12333
+ config(helper: string | {
12334
+ [key: string]: any;
12335
+ }, obj?: {
12336
+ [key: string]: any;
12337
+ }): this;
12338
+ /**
12339
+ * Append a tag name to scenario title
12340
+ */
12341
+ tag(tagName: string): this;
12342
+ /**
12343
+ * Dynamically injects dependencies, see https://codecept.io/pageobjects/#dynamic-injection
12344
+ */
12345
+ injectDependencies(dependencies: {
12346
+ [key: string]: any;
12347
+ }): this;
12348
+ }
12349
+ function addStep(step: any, fn: any): void;
12768
12350
  function within(context: CodeceptJS.LocatorOrString, fn: (...params: any[]) => any): Promise<any> | undefined;
12769
12351
  /**
12770
12352
  * This is a wrapper on top of [Detox](https://github.com/wix/Detox) library, aimied to unify testing experience for CodeceptJS framework.