codeceptjs 3.6.10 → 3.7.0-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 (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} +8 -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 +53 -516
  99. package/typings/types.d.ts +127 -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,13 @@ 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
2016
1802
  type MockServerConfig = {
2017
1803
  port?: number;
2018
1804
  host?: string;
@@ -2137,6 +1923,13 @@ declare namespace CodeceptJS {
2137
1923
  *
2138
1924
  * ## Methods
2139
1925
  */
1926
+ // @ts-ignore
1927
+ // @ts-ignore
1928
+ // @ts-ignore
1929
+ // @ts-ignore
1930
+ // @ts-ignore
1931
+ // @ts-ignore
1932
+ // @ts-ignore
2140
1933
  class MockServer {
2141
1934
  /**
2142
1935
  * Start the mock server
@@ -2977,7 +2770,7 @@ declare namespace CodeceptJS {
2977
2770
  *
2978
2771
  * ```js
2979
2772
  * I.clearCookie();
2980
- * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
2773
+ * I.clearCookie('test');
2981
2774
  * ```
2982
2775
  * @param [cookie = null] - (optional, `null` by default) cookie name
2983
2776
  */
@@ -3192,46 +2985,6 @@ declare namespace CodeceptJS {
3192
2985
  */
3193
2986
  grabPageScrollPosition(): Promise<PageScrollPosition>;
3194
2987
  }
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
2988
  /**
3236
2989
  * ## Configuration
3237
2990
  *
@@ -3276,6 +3029,13 @@ declare namespace CodeceptJS {
3276
3029
  * @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
3030
  * @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
3031
  */
3032
+ // @ts-ignore
3033
+ // @ts-ignore
3034
+ // @ts-ignore
3035
+ // @ts-ignore
3036
+ // @ts-ignore
3037
+ // @ts-ignore
3038
+ // @ts-ignore
3279
3039
  type PlaywrightConfig = {
3280
3040
  url?: string;
3281
3041
  browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
@@ -4681,7 +4441,7 @@ declare namespace CodeceptJS {
4681
4441
  *
4682
4442
  * ```js
4683
4443
  * I.clearCookie();
4684
- * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
4444
+ * I.clearCookie('test');
4685
4445
  * ```
4686
4446
  * @param [cookie = null] - (optional, `null` by default) cookie name
4687
4447
  */
@@ -6354,7 +6114,7 @@ declare namespace CodeceptJS {
6354
6114
  *
6355
6115
  * ```js
6356
6116
  * I.clearCookie();
6357
- * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
6117
+ * I.clearCookie('test');
6358
6118
  * ```
6359
6119
  * @param [cookie = null] - (optional, `null` by default) cookie name
6360
6120
  */
@@ -6803,6 +6563,13 @@ declare namespace CodeceptJS {
6803
6563
  * @property [chrome] - pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
6804
6564
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
6805
6565
  */
6566
+ // @ts-ignore
6567
+ // @ts-ignore
6568
+ // @ts-ignore
6569
+ // @ts-ignore
6570
+ // @ts-ignore
6571
+ // @ts-ignore
6572
+ // @ts-ignore
6806
6573
  type PuppeteerConfig = {
6807
6574
  url: string;
6808
6575
  basicAuth?: any;
@@ -8051,7 +7818,7 @@ declare namespace CodeceptJS {
8051
7818
  *
8052
7819
  * ```js
8053
7820
  * I.clearCookie();
8054
- * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
7821
+ * I.clearCookie('test');
8055
7822
  * ```
8056
7823
  * @param [cookie = null] - (optional, `null` by default) cookie name
8057
7824
  */
@@ -8745,6 +8512,13 @@ declare namespace CodeceptJS {
8745
8512
  * @property [onResponse] - an async function which can update response object.
8746
8513
  * @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
8747
8514
  */
8515
+ // @ts-ignore
8516
+ // @ts-ignore
8517
+ // @ts-ignore
8518
+ // @ts-ignore
8519
+ // @ts-ignore
8520
+ // @ts-ignore
8521
+ // @ts-ignore
8748
8522
  type RESTConfig = {
8749
8523
  endpoint?: string;
8750
8524
  prettyPrintJson?: boolean;
@@ -8937,250 +8711,6 @@ declare namespace CodeceptJS {
8937
8711
  */
8938
8712
  sendDeleteRequestWithPayload(url: any, payload?: any, headers?: any): Promise<any>;
8939
8713
  }
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
8714
  /**
9185
8715
  * Client Functions
9186
8716
  */
@@ -10055,7 +9585,7 @@ declare namespace CodeceptJS {
10055
9585
  *
10056
9586
  * ```js
10057
9587
  * I.clearCookie();
10058
- * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
9588
+ * I.clearCookie('test');
10059
9589
  * ```
10060
9590
  * @param [cookie = null] - (optional, `null` by default) cookie name
10061
9591
  */
@@ -10193,6 +9723,13 @@ declare namespace CodeceptJS {
10193
9723
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
10194
9724
  * @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
9725
  */
9726
+ // @ts-ignore
9727
+ // @ts-ignore
9728
+ // @ts-ignore
9729
+ // @ts-ignore
9730
+ // @ts-ignore
9731
+ // @ts-ignore
9732
+ // @ts-ignore
10196
9733
  type WebDriverConfig = {
10197
9734
  url: string;
10198
9735
  browser: string;
@@ -11540,7 +11077,7 @@ declare namespace CodeceptJS {
11540
11077
  *
11541
11078
  * ```js
11542
11079
  * I.clearCookie();
11543
- * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
11080
+ * I.clearCookie('test');
11544
11081
  * ```
11545
11082
  * @param [cookie = null] - (optional, `null` by default) cookie name
11546
11083
  */
@@ -12295,6 +11832,7 @@ declare namespace CodeceptJS {
12295
11832
  }, newPlugins: {
12296
11833
  [key: string]: any;
12297
11834
  }): void;
11835
+ static started(fn: (...params: any[]) => any): Promise<void>;
12298
11836
  /**
12299
11837
  * Share data across worker threads
12300
11838
  * @param options - set {local: true} to not share among workers
@@ -12304,7 +11842,7 @@ declare namespace CodeceptJS {
12304
11842
  /**
12305
11843
  * Method collect own property and prototype
12306
11844
  */
12307
- function getObjectMethods(): void;
11845
+ function loadTranslation(): void;
12308
11846
  /**
12309
11847
  * Datatable class to provide data driven testing
12310
11848
  */
@@ -12418,76 +11956,6 @@ declare namespace CodeceptJS {
12418
11956
  var store: typeof CodeceptJS.store;
12419
11957
  var locator: typeof CodeceptJS.Locator;
12420
11958
  }
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
11959
  class Locator {
12492
11960
  constructor(locator: CodeceptJS.LocatorOrString, defaultType?: string);
12493
11961
  toString(): string;
@@ -12729,6 +12197,7 @@ declare namespace CodeceptJS {
12729
12197
  humanizeArgs(): string;
12730
12198
  line(): string;
12731
12199
  toString(): string;
12200
+ toCliStyled(): string;
12732
12201
  toCode(): string;
12733
12202
  hasBDDAncestor(): boolean;
12734
12203
  static MetaStep: typeof MetaStep;
@@ -12744,6 +12213,7 @@ declare namespace CodeceptJS {
12744
12213
  var debugMode: boolean;
12745
12214
  var timeouts: boolean;
12746
12215
  var dryRun: boolean;
12216
+ var currentTest: CodeceptJS.Test | null;
12747
12217
  }
12748
12218
  /**
12749
12219
  * Describe a "suite" with the given `title`
@@ -12765,6 +12235,76 @@ declare namespace CodeceptJS {
12765
12235
  * Pending test case with message: 'Test not implemented!'.
12766
12236
  */
12767
12237
  const todo: CodeceptJS.IScenario;
12238
+ /**
12239
+ * Configuration for a Feature.
12240
+ * Can inject values and add custom configuration.
12241
+ */
12242
+ class FeatureConfig {
12243
+ /**
12244
+ * Retry this test for number of times
12245
+ */
12246
+ retry(retries: number): this;
12247
+ /**
12248
+ * Set timeout for this test
12249
+ */
12250
+ timeout(timeout: number): this;
12251
+ /**
12252
+ * Configures a helper.
12253
+ * Helper name can be omitted and values will be applied to first helper.
12254
+ */
12255
+ config(helper: string | number, obj: any): this;
12256
+ /**
12257
+ * Append a tag name to scenario title
12258
+ */
12259
+ tag(tagName: string): this;
12260
+ }
12261
+ class ScenarioConfig {
12262
+ /**
12263
+ * Declares that test throws error.
12264
+ * Can pass an Error object or regex matching expected message.
12265
+ */
12266
+ throws(err: any): this;
12267
+ /**
12268
+ * Declares that test should fail.
12269
+ * If test passes - throws an error.
12270
+ * Can pass an Error object or regex matching expected message.
12271
+ */
12272
+ fails(): this;
12273
+ /**
12274
+ * Retry this test for x times
12275
+ */
12276
+ retry(retries: number): this;
12277
+ /**
12278
+ * Set timeout for this test
12279
+ */
12280
+ timeout(timeout: number): this;
12281
+ /**
12282
+ * Pass in additional objects to inject into test
12283
+ */
12284
+ inject(obj: {
12285
+ [key: string]: any;
12286
+ }): this;
12287
+ /**
12288
+ * Configures a helper.
12289
+ * Helper name can be omitted and values will be applied to first helper.
12290
+ */
12291
+ config(helper: string | {
12292
+ [key: string]: any;
12293
+ }, obj?: {
12294
+ [key: string]: any;
12295
+ }): this;
12296
+ /**
12297
+ * Append a tag name to scenario title
12298
+ */
12299
+ tag(tagName: string): this;
12300
+ /**
12301
+ * Dynamically injects dependencies, see https://codecept.io/pageobjects/#dynamic-injection
12302
+ */
12303
+ injectDependencies(dependencies: {
12304
+ [key: string]: any;
12305
+ }): this;
12306
+ }
12307
+ function addStep(step: any, fn: any): void;
12768
12308
  function within(context: CodeceptJS.LocatorOrString, fn: (...params: any[]) => any): Promise<any> | undefined;
12769
12309
  /**
12770
12310
  * This is a wrapper on top of [Detox](https://github.com/wix/Detox) library, aimied to unify testing experience for CodeceptJS framework.