codeceptjs 3.1.1 → 3.2.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 (70) hide show
  1. package/CHANGELOG.md +120 -0
  2. package/README.md +2 -3
  3. package/bin/codecept.js +1 -0
  4. package/docs/advanced.md +94 -60
  5. package/docs/basics.md +1 -1
  6. package/docs/bdd.md +55 -1
  7. package/docs/build/Appium.js +22 -4
  8. package/docs/build/FileSystem.js +1 -0
  9. package/docs/build/Playwright.js +40 -42
  10. package/docs/build/Protractor.js +9 -24
  11. package/docs/build/Puppeteer.js +28 -30
  12. package/docs/build/REST.js +1 -0
  13. package/docs/build/WebDriver.js +2 -24
  14. package/docs/changelog.md +120 -0
  15. package/docs/commands.md +21 -7
  16. package/docs/configuration.md +15 -2
  17. package/docs/custom-helpers.md +1 -36
  18. package/docs/helpers/Appium.md +49 -50
  19. package/docs/helpers/FileSystem.md +1 -1
  20. package/docs/helpers/Playwright.md +16 -18
  21. package/docs/helpers/Puppeteer.md +18 -18
  22. package/docs/helpers/REST.md +3 -1
  23. package/docs/helpers/WebDriver.md +1 -17
  24. package/docs/mobile-react-native-locators.md +3 -0
  25. package/docs/playwright.md +40 -0
  26. package/docs/plugins.md +187 -70
  27. package/docs/reports.md +23 -5
  28. package/lib/actor.js +20 -2
  29. package/lib/codecept.js +15 -2
  30. package/lib/command/info.js +1 -1
  31. package/lib/config.js +13 -1
  32. package/lib/container.js +3 -1
  33. package/lib/data/dataTableArgument.js +35 -0
  34. package/lib/helper/Appium.js +22 -4
  35. package/lib/helper/FileSystem.js +1 -0
  36. package/lib/helper/Playwright.js +40 -32
  37. package/lib/helper/Protractor.js +2 -14
  38. package/lib/helper/Puppeteer.js +21 -20
  39. package/lib/helper/REST.js +1 -0
  40. package/lib/helper/WebDriver.js +2 -14
  41. package/lib/index.js +2 -0
  42. package/lib/interfaces/featureConfig.js +3 -0
  43. package/lib/interfaces/gherkin.js +7 -1
  44. package/lib/interfaces/scenarioConfig.js +4 -0
  45. package/lib/listener/helpers.js +1 -0
  46. package/lib/listener/steps.js +21 -3
  47. package/lib/listener/timeout.js +71 -0
  48. package/lib/locator.js +3 -0
  49. package/lib/mochaFactory.js +13 -9
  50. package/lib/plugin/allure.js +6 -1
  51. package/lib/plugin/{puppeteerCoverage.js → coverage.js} +10 -22
  52. package/lib/plugin/customLocator.js +2 -2
  53. package/lib/plugin/retryFailedStep.js +4 -3
  54. package/lib/plugin/retryTo.js +130 -0
  55. package/lib/plugin/screenshotOnFail.js +1 -0
  56. package/lib/plugin/stepByStepReport.js +7 -0
  57. package/lib/plugin/stepTimeout.js +90 -0
  58. package/lib/plugin/subtitles.js +88 -0
  59. package/lib/plugin/tryTo.js +1 -1
  60. package/lib/recorder.js +21 -8
  61. package/lib/step.js +7 -2
  62. package/lib/store.js +2 -0
  63. package/lib/ui.js +2 -2
  64. package/package.json +6 -7
  65. package/typings/index.d.ts +8 -1
  66. package/typings/types.d.ts +104 -71
  67. package/docs/angular.md +0 -325
  68. package/docs/helpers/Protractor.md +0 -1658
  69. package/docs/webapi/waitUntil.mustache +0 -11
  70. package/typings/Protractor.d.ts +0 -16
package/lib/step.js CHANGED
@@ -38,6 +38,9 @@ class Step {
38
38
  this.metaStep = undefined;
39
39
  /** @member {string} */
40
40
  this.stack = '';
41
+ /** @member {number} */
42
+ this.totalTimeout = undefined;
43
+
41
44
  this.setTrace();
42
45
  }
43
46
 
@@ -212,16 +215,18 @@ class MetaStep extends Step {
212
215
  step.metaStep = this;
213
216
  };
214
217
  event.dispatcher.prependListener(event.step.before, registerStep);
218
+ let rethrownError = null;
215
219
  try {
216
220
  this.startTime = Date.now();
217
221
  result = fn.apply(this.context, this.args);
218
222
  } catch (error) {
219
- this.status = 'failed';
223
+ this.setStatus('failed');
224
+ rethrownError = error;
220
225
  } finally {
221
226
  this.endTime = Date.now();
222
-
223
227
  event.dispatcher.removeListener(event.step.before, registerStep);
224
228
  }
229
+ if (rethrownError) { throw rethrownError; }
225
230
  return result;
226
231
  }
227
232
  }
package/lib/store.js CHANGED
@@ -5,6 +5,8 @@
5
5
  const store = {
6
6
  /** @type {boolean} */
7
7
  debugMode: false,
8
+ /** @type {boolean} */
9
+ timeouts: true,
8
10
  };
9
11
 
10
12
  module.exports = store;
package/lib/ui.js CHANGED
@@ -65,7 +65,7 @@ module.exports = function (suite) {
65
65
 
66
66
  suite.addTest(scenario.test(test));
67
67
  if (opts.retries) test.retries(opts.retries);
68
- if (opts.timeout) test.timeout(opts.timeout);
68
+ if (opts.timeout) test.totalTimeout = opts.timeout;
69
69
  test.opts = opts;
70
70
 
71
71
  return new ScenarioConfig(test);
@@ -103,7 +103,7 @@ module.exports = function (suite) {
103
103
  suite.timeout(0);
104
104
 
105
105
  if (opts.retries) suite.retries(opts.retries);
106
- if (opts.timeout) suite.timeout(opts.timeout);
106
+ if (opts.timeout) suite.totalTimeout = opts.timeout;
107
107
 
108
108
  suite.tags = title.match(/(\@[a-zA-Z0-9-_]+)/g) || []; // match tags from title
109
109
  suite.file = file;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "3.1.1",
3
+ "version": "3.2.1",
4
4
  "description": "Supercharged End 2 End Testing Framework for NodeJS",
5
5
  "keywords": [
6
6
  "acceptance",
@@ -10,7 +10,6 @@
10
10
  "webdriver",
11
11
  "testcafe",
12
12
  "playwright",
13
- "protractor",
14
13
  "bdd",
15
14
  "tdd",
16
15
  "testing"
@@ -84,7 +83,8 @@
84
83
  "promise-retry": "^1.1.1",
85
84
  "requireg": "^0.2.2",
86
85
  "resq": "^1.10.0",
87
- "sprintf-js": "^1.1.1"
86
+ "sprintf-js": "^1.1.1",
87
+ "uuid": "^8.3.2"
88
88
  },
89
89
  "devDependencies": {
90
90
  "@codeceptjs/detox-helper": "^1.0.2",
@@ -102,7 +102,7 @@
102
102
  "chai-subset": "^1.6.0",
103
103
  "contributor-faces": "^1.0.3",
104
104
  "documentation": "^12.3.0",
105
- "dtslint": "^3.6.12",
105
+ "dtslint": "^4.1.6",
106
106
  "electron": "^12.0.0",
107
107
  "eslint": "^6.8.0",
108
108
  "eslint-config-airbnb-base": "^14.2.1",
@@ -121,7 +121,6 @@
121
121
  "nightmare": "^3.0.2",
122
122
  "nodemon": "^1.19.4",
123
123
  "playwright": "^1.9.1",
124
- "protractor": "^5.4.4",
125
124
  "puppeteer": "^10.0.0",
126
125
  "qrcode-terminal": "^0.12.0",
127
126
  "rosie": "^1.6.0",
@@ -132,9 +131,9 @@
132
131
  "testcafe": "^1.9.4",
133
132
  "ts-morph": "^3.1.3",
134
133
  "tsd-jsdoc": "^2.5.0",
135
- "typescript": "^3.7.5",
134
+ "typescript": "^4.4.3",
136
135
  "wdio-docker-service": "^1.5.0",
137
- "webdriverio": "^6.10.7",
136
+ "webdriverio": "^7.14.1",
138
137
  "xml2js": "^0.4.23",
139
138
  "xmldom": "^0.1.31",
140
139
  "xpath": "0.0.27"
@@ -66,7 +66,7 @@ declare namespace CodeceptJS {
66
66
  type StringOrSecret = string | CodeceptJS.Secret;
67
67
 
68
68
  interface HookCallback {
69
- (args: SupportObject): void;
69
+ (args: SupportObject): void | Promise<void>;
70
70
  }
71
71
  interface Scenario extends IScenario {
72
72
  only: IScenario;
@@ -111,6 +111,7 @@ declare const pause: typeof CodeceptJS.pause;
111
111
  declare const within: typeof CodeceptJS.within;
112
112
  declare const session: typeof CodeceptJS.session;
113
113
  declare const DataTable: typeof CodeceptJS.DataTable;
114
+ declare const DataTableArgument: typeof CodeceptJS.DataTableArgument;
114
115
  declare const codeceptjs: typeof CodeceptJS.index;
115
116
  declare const locate: typeof CodeceptJS.Locator.build;
116
117
  declare function inject(): CodeceptJS.SupportObject;
@@ -160,6 +161,7 @@ declare namespace NodeJS {
160
161
  within: typeof within;
161
162
  session: typeof session;
162
163
  DataTable: typeof DataTable;
164
+ DataTableArgument: typeof DataTableArgument;
163
165
  locate: typeof locate;
164
166
  inject: typeof inject;
165
167
  secret: typeof secret;
@@ -193,6 +195,7 @@ declare namespace Mocha {
193
195
  }
194
196
 
195
197
  interface Test extends Runnable {
198
+ artifacts: [],
196
199
  tags: any[];
197
200
  }
198
201
  }
@@ -200,3 +203,7 @@ declare namespace Mocha {
200
203
  declare module "codeceptjs" {
201
204
  export = codeceptjs;
202
205
  }
206
+
207
+ declare module "@codeceptjs/helper" {
208
+ export = CodeceptJS.Helper;
209
+ }
@@ -321,11 +321,11 @@ declare namespace CodeceptJS {
321
321
  * ```js
322
322
  * I.removeApp('appName', 'com.example.android.apis');
323
323
  * ```
324
- * @param bundleId - String ID of bundle
325
324
  *
326
325
  * Appium: support only Android
326
+ * @param [bundleId] - ID of bundle
327
327
  */
328
- removeApp(appId: string, bundleId: string): void;
328
+ removeApp(appId: string, bundleId?: string): void;
329
329
  /**
330
330
  * Check current activity on an Android device.
331
331
  *
@@ -522,11 +522,12 @@ declare namespace CodeceptJS {
522
522
  * // or by pressing key
523
523
  * I.hideDeviceKeyboard('pressKey', 'Done');
524
524
  * ```
525
- * @param strategy - desired strategy to close keyboard (‘tapOutside’ or ‘pressKey’)
526
525
  *
527
526
  * Appium: support Android and iOS
527
+ * @param [strategy] - Desired strategy to close keyboard (‘tapOutside’ or ‘pressKey’)
528
+ * @param [key] - Optional key
528
529
  */
529
- hideDeviceKeyboard(strategy: 'tapOutside' | 'pressKey'): void;
530
+ hideDeviceKeyboard(strategy?: 'tapOutside' | 'pressKey', key?: string): void;
530
531
  /**
531
532
  * Send a key event to the device.
532
533
  * List of keys: https://developer.android.com/reference/android/view/KeyEvent.html
@@ -682,8 +683,9 @@ declare namespace CodeceptJS {
682
683
  * ```
683
684
  *
684
685
  * Appium: support Android and iOS
686
+ * @param actions - Array of touch actions
685
687
  */
686
- touchPerform(): void;
688
+ touchPerform(actions: any[]): void;
687
689
  /**
688
690
  * Pulls a file from the device.
689
691
  *
@@ -948,6 +950,16 @@ declare namespace CodeceptJS {
948
950
  * @returns attribute value
949
951
  */
950
952
  grabValueFrom(locator: CodeceptJS.LocatorOrString): Promise<string>;
953
+ /**
954
+ * Saves a screenshot to ouput folder (set in codecept.json or codecept.conf.js).
955
+ * Filename is relative to output folder.
956
+ *
957
+ * ```js
958
+ * I.saveScreenshot('debug.png');
959
+ * ```
960
+ * @param fileName - file name to save.
961
+ */
962
+ saveScreenshot(fileName: string): void;
951
963
  /**
952
964
  * Scroll element into viewport.
953
965
  *
@@ -1135,7 +1147,7 @@ declare namespace CodeceptJS {
1135
1147
  * I.seeFileNameMatching('.pdf');
1136
1148
  * ```
1137
1149
  */
1138
- seeFileNameMatching(): void;
1150
+ seeFileNameMatching(text: string): void;
1139
1151
  /**
1140
1152
  * Checks that file found by `seeFile` includes a text.
1141
1153
  */
@@ -2421,6 +2433,7 @@ declare namespace CodeceptJS {
2421
2433
  * * `basicAuth`: (optional) the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
2422
2434
  * * `windowSize`: (optional) default window size. Set a dimension like `640x480`.
2423
2435
  * * `userAgent`: (optional) user-agent string.
2436
+ * * `locale`: (optional) locale string. Example: 'en-GB', 'de-DE', 'fr-FR', ...
2424
2437
  * * `manualStart`: (optional, default: false) - do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
2425
2438
  * * `chromium`: (optional) pass additional chromium options
2426
2439
  * * `electron`: (optional) pass additional electron options
@@ -2538,6 +2551,19 @@ declare namespace CodeceptJS {
2538
2551
  * }
2539
2552
  * ```
2540
2553
  *
2554
+ * #### Example #7: Launch test with a specifc user locale
2555
+ *
2556
+ * ```js
2557
+ * {
2558
+ * helpers: {
2559
+ * Playwright : {
2560
+ * url: "http://localhost",
2561
+ * locale: "fr-FR",
2562
+ * }
2563
+ * }
2564
+ * }
2565
+ * ```
2566
+ *
2541
2567
  * Note: When connecting to remote browser `show` and specific `chrome` options (e.g. `headless` or `devtools`) are ignored.
2542
2568
  *
2543
2569
  * ## Access From Helpers
@@ -3848,11 +3874,11 @@ declare namespace CodeceptJS {
3848
3874
  */
3849
3875
  waitForRequest(urlOrPredicate: string | ((...params: any[]) => any), sec?: number): void;
3850
3876
  /**
3851
- * Waits for a network request.
3877
+ * Waits for a network response.
3852
3878
  *
3853
3879
  * ```js
3854
3880
  * I.waitForResponse('http://example.com/resource');
3855
- * I.waitForResponse(request => request.url() === 'http://example.com' && request.method() === 'GET');
3881
+ * I.waitForResponse(response => response.url() === 'https://example.com' && response.status() === 200);
3856
3882
  * ```
3857
3883
  * @param [sec = null] - number of seconds to wait
3858
3884
  */
@@ -3891,18 +3917,6 @@ declare namespace CodeceptJS {
3891
3917
  * See [Playwright's reference](https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions)
3892
3918
  */
3893
3919
  waitForNavigation(opts: any): void;
3894
- /**
3895
- * Waits for a function to return true (waits for 1sec by default).
3896
- *
3897
- * ```js
3898
- * I.waitUntil(() => window.requests == 0);
3899
- * I.waitUntil(() => window.requests == 0, 5);
3900
- * ```
3901
- * @param fn - function which is executed in browser context.
3902
- * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
3903
- * @param [timeoutMsg = ''] - message to show in case of timeout fail.
3904
- */
3905
- waitUntil(fn: ((...params: any[]) => any) | string, sec?: number, timeoutMsg?: string, interval?: number): void;
3906
3920
  /**
3907
3921
  * Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
3908
3922
  * Element can be located by CSS or XPath.
@@ -4610,11 +4624,12 @@ declare namespace CodeceptJS {
4610
4624
  /**
4611
4625
  * Checks that title is equal to provided one.
4612
4626
  *
4613
- * ```js
4614
- * I.seeTitleEquals('Test title.');
4615
- * ```
4627
+ * ```js
4628
+ * I.seeTitleEquals('Test title.');
4629
+ * ```
4630
+ * @param text - value to check.
4616
4631
  */
4617
- seeTitleEquals(): void;
4632
+ seeTitleEquals(text: string): void;
4618
4633
  /**
4619
4634
  * Checks that title does not contain text.
4620
4635
  *
@@ -5144,18 +5159,6 @@ declare namespace CodeceptJS {
5144
5159
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
5145
5160
  */
5146
5161
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
5147
- /**
5148
- * Waits for a function to return true (waits for 1sec by default).
5149
- *
5150
- * ```js
5151
- * I.waitUntil(() => window.requests == 0);
5152
- * I.waitUntil(() => window.requests == 0, 5);
5153
- * ```
5154
- * @param fn - function which is executed in browser context.
5155
- * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5156
- * @param [timeoutMsg = ''] - message to show in case of timeout fail.
5157
- */
5158
- waitUntil(fn: ((...params: any[]) => any) | string, sec?: number, timeoutMsg?: string, interval?: number): void;
5159
5162
  /**
5160
5163
  * Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
5161
5164
  *
@@ -5374,6 +5377,7 @@ declare namespace CodeceptJS {
5374
5377
  * }
5375
5378
  * }
5376
5379
  * ```
5380
+ * > Note: When connecting to remote browser `show` and specific `chrome` options (e.g. `headless` or `devtools`) are ignored.
5377
5381
  *
5378
5382
  * #### Example #5: Target URL with provided basic authentication
5379
5383
  *
@@ -5388,10 +5392,25 @@ declare namespace CodeceptJS {
5388
5392
  * }
5389
5393
  * }
5390
5394
  * ```
5395
+ * #### Troubleshooting
5391
5396
  *
5397
+ * Error Message: `No usable sandbox!`
5398
+ *
5399
+ * When running Puppeteer on CI try to disable sandbox if you see that message
5400
+ *
5401
+ * ```
5402
+ * helpers: {
5403
+ * Puppeteer: {
5404
+ * url: 'http://localhost',
5405
+ * show: false,
5406
+ * chrome: {
5407
+ * args: ['--no-sandbox', '--disable-setuid-sandbox']
5408
+ * }
5409
+ * },
5410
+ * }
5411
+ * ```
5392
5412
  *
5393
5413
  *
5394
- * Note: When connecting to remote browser `show` and specific `chrome` options (e.g. `headless` or `devtools`) are ignored.
5395
5414
  *
5396
5415
  * ## Access From Helpers
5397
5416
  *
@@ -5606,11 +5625,12 @@ declare namespace CodeceptJS {
5606
5625
  /**
5607
5626
  * Checks that title is equal to provided one.
5608
5627
  *
5609
- * ```js
5610
- * I.seeTitleEquals('Test title.');
5611
- * ```
5628
+ * ```js
5629
+ * I.seeTitleEquals('Test title.');
5630
+ * ```
5631
+ * @param text - value to check.
5612
5632
  */
5613
- seeTitleEquals(): void;
5633
+ seeTitleEquals(text: string): void;
5614
5634
  /**
5615
5635
  * Checks that title does not contain text.
5616
5636
  *
@@ -6819,18 +6839,6 @@ declare namespace CodeceptJS {
6819
6839
  * See [Pupeteer's reference](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitfornavigationoptions)
6820
6840
  */
6821
6841
  waitForNavigation(opts: any): void;
6822
- /**
6823
- * Waits for a function to return true (waits for 1sec by default).
6824
- *
6825
- * ```js
6826
- * I.waitUntil(() => window.requests == 0);
6827
- * I.waitUntil(() => window.requests == 0, 5);
6828
- * ```
6829
- * @param fn - function which is executed in browser context.
6830
- * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
6831
- * @param [timeoutMsg = ''] - message to show in case of timeout fail.
6832
- */
6833
- waitUntil(fn: ((...params: any[]) => any) | string, sec?: number, timeoutMsg?: string, interval?: number): void;
6834
6842
  /**
6835
6843
  * Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
6836
6844
  * Element can be located by CSS or XPath.
@@ -6943,8 +6951,9 @@ declare namespace CodeceptJS {
6943
6951
  * ```js
6944
6952
  * I.setRequestTimeout(10000); // In milliseconds
6945
6953
  * ```
6954
+ * @param newTimeout - timeout in milliseconds
6946
6955
  */
6947
- setRequestTimeout(): void;
6956
+ setRequestTimeout(newTimeout: number): void;
6948
6957
  /**
6949
6958
  * Send GET request to REST API
6950
6959
  *
@@ -8394,7 +8403,7 @@ declare namespace CodeceptJS {
8394
8403
  * ```
8395
8404
  * @param timeouts - WebDriver timeouts object.
8396
8405
  */
8397
- defineTimeout(timeouts: WebdriverIO.Timeouts): void;
8406
+ defineTimeout(timeouts: any): void;
8398
8407
  /**
8399
8408
  * Opens a web page in a browser. Requires relative or absolute url.
8400
8409
  * If url starts with `/`, opens a web page of a site defined in `url` config parameter.
@@ -9614,18 +9623,6 @@ declare namespace CodeceptJS {
9614
9623
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
9615
9624
  */
9616
9625
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
9617
- /**
9618
- * Waits for a function to return true (waits for 1sec by default).
9619
- *
9620
- * ```js
9621
- * I.waitUntil(() => window.requests == 0);
9622
- * I.waitUntil(() => window.requests == 0, 5);
9623
- * ```
9624
- * @param fn - function which is executed in browser context.
9625
- * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
9626
- * @param [timeoutMsg = ''] - message to show in case of timeout fail.
9627
- */
9628
- waitUntil(fn: ((...params: any[]) => any) | string, sec?: number, timeoutMsg?: string, interval?: number): void;
9629
9626
  /**
9630
9627
  * Switches frame or in case of null locator reverts to parent.
9631
9628
  *
@@ -9777,7 +9774,12 @@ declare namespace CodeceptJS {
9777
9774
  * add print comment method`
9778
9775
  */
9779
9776
  say(msg: string, color?: string): Promise<any> | undefined;
9780
- retry(opts: any): this;
9777
+ /**
9778
+ * set the maximum execution time for the next step
9779
+ * @param timeout - step timeout in seconds
9780
+ */
9781
+ limitTime(timeout: number): this;
9782
+ retry(opts?: any): this;
9781
9783
  }
9782
9784
  /**
9783
9785
  * Create CodeceptJS runner.
@@ -9921,6 +9923,34 @@ declare namespace CodeceptJS {
9921
9923
  xadd(array: any[]): void;
9922
9924
  filter(func: (...params: any[]) => any): void;
9923
9925
  }
9926
+ /**
9927
+ * DataTableArgument class to store the Cucumber data table from
9928
+ * a step as an object with methods that can be used to access the data.
9929
+ */
9930
+ class DataTableArgument {
9931
+ constructor(gherkinDataTable: any);
9932
+ /**
9933
+ * Returns the table as a 2-D array
9934
+ */
9935
+ raw(): string[][];
9936
+ /**
9937
+ * Returns the table as a 2-D array, without the first row
9938
+ */
9939
+ rows(): string[][];
9940
+ /**
9941
+ * Returns an array of objects where each row is converted to an object (column header is the key)
9942
+ */
9943
+ hashes(): any[];
9944
+ /**
9945
+ * Returns an object where each row corresponds to an entry
9946
+ * (first column is the key, second column is the value)
9947
+ */
9948
+ rowsHash(): Record<string, string>;
9949
+ /**
9950
+ * Transposed the data
9951
+ */
9952
+ transpose(): void;
9953
+ }
9924
9954
  namespace event {
9925
9955
  const dispatcher: NodeJS.EventEmitter;
9926
9956
  const test: {
@@ -10017,6 +10047,7 @@ declare namespace CodeceptJS {
10017
10047
  var pause: typeof CodeceptJS.pause;
10018
10048
  var within: typeof CodeceptJS.within;
10019
10049
  var dataTable: typeof CodeceptJS.DataTable;
10050
+ var dataTableArgument: typeof CodeceptJS.DataTableArgument;
10020
10051
  var store: typeof CodeceptJS.store;
10021
10052
  var locator: typeof CodeceptJS.Locator;
10022
10053
  }
@@ -10123,11 +10154,11 @@ declare namespace CodeceptJS {
10123
10154
  /**
10124
10155
  * Filters to modify locators
10125
10156
  */
10126
- static filters: any;
10157
+ static filters: ((arg0: CodeceptJS.LocatorOrString, arg1: Locator) => void)[];
10127
10158
  /**
10128
10159
  * Appends new `Locator` filter to an `Locator.filters` array, and returns the new length of the array.
10129
10160
  */
10130
- static addFilter(): void;
10161
+ static addFilter(fn: (...params: any[]) => any): number;
10131
10162
  }
10132
10163
  namespace output {
10133
10164
  var stepShift: number;
@@ -10217,7 +10248,7 @@ declare namespace CodeceptJS {
10217
10248
  * true: it will retries if `retryOpts` set.
10218
10249
  * false: ignore `retryOpts` and won't retry.
10219
10250
  */
10220
- add(taskName: string | ((...params: any[]) => any), fn?: (...params: any[]) => any, force?: boolean, retry?: boolean): Promise<any> | undefined;
10251
+ add(taskName: string | ((...params: any[]) => any), fn?: (...params: any[]) => any, force?: boolean, retry?: boolean, timeout?: number): Promise<any> | undefined;
10221
10252
  retry(opts: any): any;
10222
10253
  catch(customErrFn?: (...params: any[]) => any): Promise<any>;
10223
10254
  catchWithoutStop(customErrFn: (...params: any[]) => any): Promise<any>;
@@ -10280,6 +10311,7 @@ declare namespace CodeceptJS {
10280
10311
  args: any[];
10281
10312
  metaStep: MetaStep;
10282
10313
  stack: string;
10314
+ totalTimeout: number;
10283
10315
  setTrace(): void;
10284
10316
  setArguments(args: any[]): void;
10285
10317
  run(...args: any[]): any;
@@ -10301,6 +10333,7 @@ declare namespace CodeceptJS {
10301
10333
  */
10302
10334
  namespace store {
10303
10335
  var debugMode: boolean;
10336
+ var timeouts: boolean;
10304
10337
  }
10305
10338
  /**
10306
10339
  * Describe a "suite" with the given `title`