codeceptjs 3.1.2 → 3.2.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.
- package/CHANGELOG.md +103 -0
- package/README.md +2 -3
- package/bin/codecept.js +1 -0
- package/docs/advanced.md +94 -60
- package/docs/basics.md +27 -2
- package/docs/bdd.md +57 -3
- package/docs/build/Appium.js +8 -4
- package/docs/build/FileSystem.js +1 -0
- package/docs/build/Playwright.js +39 -30
- package/docs/build/Protractor.js +9 -24
- package/docs/build/Puppeteer.js +10 -28
- package/docs/build/REST.js +1 -0
- package/docs/build/WebDriver.js +3 -25
- package/docs/changelog.md +103 -0
- package/docs/commands.md +21 -7
- package/docs/custom-helpers.md +1 -36
- package/docs/helpers/Appium.md +34 -30
- package/docs/helpers/FileSystem.md +1 -1
- package/docs/helpers/Playwright.md +16 -18
- package/docs/helpers/Puppeteer.md +1 -17
- package/docs/helpers/REST.md +3 -1
- package/docs/helpers/WebDriver.md +1 -17
- package/docs/mobile-react-native-locators.md +3 -0
- package/docs/pageobjects.md +2 -0
- package/docs/playwright.md +16 -33
- package/docs/plugins.md +128 -3
- package/docs/reports.md +23 -5
- package/lib/actor.js +20 -2
- package/lib/codecept.js +2 -0
- package/lib/command/info.js +1 -1
- package/lib/config.js +13 -1
- package/lib/container.js +3 -1
- package/lib/data/dataTableArgument.js +35 -0
- package/lib/helper/Appium.js +8 -4
- package/lib/helper/FileSystem.js +1 -0
- package/lib/helper/Playwright.js +39 -20
- package/lib/helper/Protractor.js +2 -14
- package/lib/helper/Puppeteer.js +3 -18
- package/lib/helper/REST.js +1 -0
- package/lib/helper/WebDriver.js +3 -15
- package/lib/index.js +2 -0
- package/lib/interfaces/featureConfig.js +3 -0
- package/lib/interfaces/gherkin.js +7 -1
- package/lib/interfaces/scenarioConfig.js +4 -0
- package/lib/listener/helpers.js +1 -0
- package/lib/listener/steps.js +21 -3
- package/lib/listener/timeout.js +72 -0
- package/lib/locator.js +3 -0
- package/lib/mochaFactory.js +2 -3
- package/lib/plugin/allure.js +6 -1
- package/lib/plugin/coverage.js +1 -1
- package/lib/plugin/retryFailedStep.js +4 -3
- package/lib/plugin/retryTo.js +130 -0
- package/lib/plugin/screenshotOnFail.js +1 -0
- package/lib/plugin/stepByStepReport.js +7 -0
- package/lib/plugin/stepTimeout.js +91 -0
- package/lib/recorder.js +23 -9
- package/lib/step.js +58 -0
- package/lib/store.js +2 -0
- package/lib/ui.js +2 -2
- package/package.json +4 -6
- package/typings/index.d.ts +8 -1
- package/typings/types.d.ts +103 -70
- package/docs/angular.md +0 -325
- package/docs/helpers/Protractor.md +0 -1658
- package/docs/webapi/waitUntil.mustache +0 -11
- package/typings/Protractor.d.ts +0 -16
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.
|
|
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.
|
|
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.
|
|
3
|
+
"version": "3.2.2",
|
|
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"
|
|
@@ -103,7 +102,7 @@
|
|
|
103
102
|
"chai-subset": "^1.6.0",
|
|
104
103
|
"contributor-faces": "^1.0.3",
|
|
105
104
|
"documentation": "^12.3.0",
|
|
106
|
-
"dtslint": "^
|
|
105
|
+
"dtslint": "^4.1.6",
|
|
107
106
|
"electron": "^12.0.0",
|
|
108
107
|
"eslint": "^6.8.0",
|
|
109
108
|
"eslint-config-airbnb-base": "^14.2.1",
|
|
@@ -122,7 +121,6 @@
|
|
|
122
121
|
"nightmare": "^3.0.2",
|
|
123
122
|
"nodemon": "^1.19.4",
|
|
124
123
|
"playwright": "^1.9.1",
|
|
125
|
-
"protractor": "^5.4.4",
|
|
126
124
|
"puppeteer": "^10.0.0",
|
|
127
125
|
"qrcode-terminal": "^0.12.0",
|
|
128
126
|
"rosie": "^1.6.0",
|
|
@@ -133,9 +131,9 @@
|
|
|
133
131
|
"testcafe": "^1.9.4",
|
|
134
132
|
"ts-morph": "^3.1.3",
|
|
135
133
|
"tsd-jsdoc": "^2.5.0",
|
|
136
|
-
"typescript": "^
|
|
134
|
+
"typescript": "^4.4.3",
|
|
137
135
|
"wdio-docker-service": "^1.5.0",
|
|
138
|
-
"webdriverio": "^
|
|
136
|
+
"webdriverio": "^7.14.1",
|
|
139
137
|
"xml2js": "^0.4.23",
|
|
140
138
|
"xmldom": "^0.1.31",
|
|
141
139
|
"xpath": "0.0.27"
|
package/typings/index.d.ts
CHANGED
|
@@ -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
|
+
}
|
package/typings/types.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
*
|
|
@@ -1145,7 +1147,7 @@ declare namespace CodeceptJS {
|
|
|
1145
1147
|
* I.seeFileNameMatching('.pdf');
|
|
1146
1148
|
* ```
|
|
1147
1149
|
*/
|
|
1148
|
-
seeFileNameMatching(): void;
|
|
1150
|
+
seeFileNameMatching(text: string): void;
|
|
1149
1151
|
/**
|
|
1150
1152
|
* Checks that file found by `seeFile` includes a text.
|
|
1151
1153
|
*/
|
|
@@ -2431,6 +2433,7 @@ declare namespace CodeceptJS {
|
|
|
2431
2433
|
* * `basicAuth`: (optional) the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
|
|
2432
2434
|
* * `windowSize`: (optional) default window size. Set a dimension like `640x480`.
|
|
2433
2435
|
* * `userAgent`: (optional) user-agent string.
|
|
2436
|
+
* * `locale`: (optional) locale string. Example: 'en-GB', 'de-DE', 'fr-FR', ...
|
|
2434
2437
|
* * `manualStart`: (optional, default: false) - do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
|
|
2435
2438
|
* * `chromium`: (optional) pass additional chromium options
|
|
2436
2439
|
* * `electron`: (optional) pass additional electron options
|
|
@@ -2548,6 +2551,19 @@ declare namespace CodeceptJS {
|
|
|
2548
2551
|
* }
|
|
2549
2552
|
* ```
|
|
2550
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
|
+
*
|
|
2551
2567
|
* Note: When connecting to remote browser `show` and specific `chrome` options (e.g. `headless` or `devtools`) are ignored.
|
|
2552
2568
|
*
|
|
2553
2569
|
* ## Access From Helpers
|
|
@@ -3858,11 +3874,11 @@ declare namespace CodeceptJS {
|
|
|
3858
3874
|
*/
|
|
3859
3875
|
waitForRequest(urlOrPredicate: string | ((...params: any[]) => any), sec?: number): void;
|
|
3860
3876
|
/**
|
|
3861
|
-
* Waits for a network
|
|
3877
|
+
* Waits for a network response.
|
|
3862
3878
|
*
|
|
3863
3879
|
* ```js
|
|
3864
3880
|
* I.waitForResponse('http://example.com/resource');
|
|
3865
|
-
* I.waitForResponse(
|
|
3881
|
+
* I.waitForResponse(response => response.url() === 'https://example.com' && response.status() === 200);
|
|
3866
3882
|
* ```
|
|
3867
3883
|
* @param [sec = null] - number of seconds to wait
|
|
3868
3884
|
*/
|
|
@@ -3901,18 +3917,6 @@ declare namespace CodeceptJS {
|
|
|
3901
3917
|
* See [Playwright's reference](https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions)
|
|
3902
3918
|
*/
|
|
3903
3919
|
waitForNavigation(opts: any): void;
|
|
3904
|
-
/**
|
|
3905
|
-
* Waits for a function to return true (waits for 1sec by default).
|
|
3906
|
-
*
|
|
3907
|
-
* ```js
|
|
3908
|
-
* I.waitUntil(() => window.requests == 0);
|
|
3909
|
-
* I.waitUntil(() => window.requests == 0, 5);
|
|
3910
|
-
* ```
|
|
3911
|
-
* @param fn - function which is executed in browser context.
|
|
3912
|
-
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
3913
|
-
* @param [timeoutMsg = ''] - message to show in case of timeout fail.
|
|
3914
|
-
*/
|
|
3915
|
-
waitUntil(fn: ((...params: any[]) => any) | string, sec?: number, timeoutMsg?: string, interval?: number): void;
|
|
3916
3920
|
/**
|
|
3917
3921
|
* Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
|
|
3918
3922
|
* Element can be located by CSS or XPath.
|
|
@@ -4620,11 +4624,12 @@ declare namespace CodeceptJS {
|
|
|
4620
4624
|
/**
|
|
4621
4625
|
* Checks that title is equal to provided one.
|
|
4622
4626
|
*
|
|
4623
|
-
*
|
|
4624
|
-
*
|
|
4625
|
-
*
|
|
4627
|
+
* ```js
|
|
4628
|
+
* I.seeTitleEquals('Test title.');
|
|
4629
|
+
* ```
|
|
4630
|
+
* @param text - value to check.
|
|
4626
4631
|
*/
|
|
4627
|
-
seeTitleEquals(): void;
|
|
4632
|
+
seeTitleEquals(text: string): void;
|
|
4628
4633
|
/**
|
|
4629
4634
|
* Checks that title does not contain text.
|
|
4630
4635
|
*
|
|
@@ -5154,18 +5159,6 @@ declare namespace CodeceptJS {
|
|
|
5154
5159
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
5155
5160
|
*/
|
|
5156
5161
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
|
|
5157
|
-
/**
|
|
5158
|
-
* Waits for a function to return true (waits for 1sec by default).
|
|
5159
|
-
*
|
|
5160
|
-
* ```js
|
|
5161
|
-
* I.waitUntil(() => window.requests == 0);
|
|
5162
|
-
* I.waitUntil(() => window.requests == 0, 5);
|
|
5163
|
-
* ```
|
|
5164
|
-
* @param fn - function which is executed in browser context.
|
|
5165
|
-
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5166
|
-
* @param [timeoutMsg = ''] - message to show in case of timeout fail.
|
|
5167
|
-
*/
|
|
5168
|
-
waitUntil(fn: ((...params: any[]) => any) | string, sec?: number, timeoutMsg?: string, interval?: number): void;
|
|
5169
5162
|
/**
|
|
5170
5163
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
5171
5164
|
*
|
|
@@ -5632,11 +5625,12 @@ declare namespace CodeceptJS {
|
|
|
5632
5625
|
/**
|
|
5633
5626
|
* Checks that title is equal to provided one.
|
|
5634
5627
|
*
|
|
5635
|
-
*
|
|
5636
|
-
*
|
|
5637
|
-
*
|
|
5628
|
+
* ```js
|
|
5629
|
+
* I.seeTitleEquals('Test title.');
|
|
5630
|
+
* ```
|
|
5631
|
+
* @param text - value to check.
|
|
5638
5632
|
*/
|
|
5639
|
-
seeTitleEquals(): void;
|
|
5633
|
+
seeTitleEquals(text: string): void;
|
|
5640
5634
|
/**
|
|
5641
5635
|
* Checks that title does not contain text.
|
|
5642
5636
|
*
|
|
@@ -6845,18 +6839,6 @@ declare namespace CodeceptJS {
|
|
|
6845
6839
|
* See [Pupeteer's reference](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitfornavigationoptions)
|
|
6846
6840
|
*/
|
|
6847
6841
|
waitForNavigation(opts: any): void;
|
|
6848
|
-
/**
|
|
6849
|
-
* Waits for a function to return true (waits for 1sec by default).
|
|
6850
|
-
*
|
|
6851
|
-
* ```js
|
|
6852
|
-
* I.waitUntil(() => window.requests == 0);
|
|
6853
|
-
* I.waitUntil(() => window.requests == 0, 5);
|
|
6854
|
-
* ```
|
|
6855
|
-
* @param fn - function which is executed in browser context.
|
|
6856
|
-
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
6857
|
-
* @param [timeoutMsg = ''] - message to show in case of timeout fail.
|
|
6858
|
-
*/
|
|
6859
|
-
waitUntil(fn: ((...params: any[]) => any) | string, sec?: number, timeoutMsg?: string, interval?: number): void;
|
|
6860
6842
|
/**
|
|
6861
6843
|
* Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
|
|
6862
6844
|
* Element can be located by CSS or XPath.
|
|
@@ -6969,8 +6951,9 @@ declare namespace CodeceptJS {
|
|
|
6969
6951
|
* ```js
|
|
6970
6952
|
* I.setRequestTimeout(10000); // In milliseconds
|
|
6971
6953
|
* ```
|
|
6954
|
+
* @param newTimeout - timeout in milliseconds
|
|
6972
6955
|
*/
|
|
6973
|
-
setRequestTimeout(): void;
|
|
6956
|
+
setRequestTimeout(newTimeout: number): void;
|
|
6974
6957
|
/**
|
|
6975
6958
|
* Send GET request to REST API
|
|
6976
6959
|
*
|
|
@@ -8420,7 +8403,7 @@ declare namespace CodeceptJS {
|
|
|
8420
8403
|
* ```
|
|
8421
8404
|
* @param timeouts - WebDriver timeouts object.
|
|
8422
8405
|
*/
|
|
8423
|
-
defineTimeout(timeouts:
|
|
8406
|
+
defineTimeout(timeouts: any): void;
|
|
8424
8407
|
/**
|
|
8425
8408
|
* Opens a web page in a browser. Requires relative or absolute url.
|
|
8426
8409
|
* If url starts with `/`, opens a web page of a site defined in `url` config parameter.
|
|
@@ -9640,18 +9623,6 @@ declare namespace CodeceptJS {
|
|
|
9640
9623
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
9641
9624
|
*/
|
|
9642
9625
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
|
|
9643
|
-
/**
|
|
9644
|
-
* Waits for a function to return true (waits for 1sec by default).
|
|
9645
|
-
*
|
|
9646
|
-
* ```js
|
|
9647
|
-
* I.waitUntil(() => window.requests == 0);
|
|
9648
|
-
* I.waitUntil(() => window.requests == 0, 5);
|
|
9649
|
-
* ```
|
|
9650
|
-
* @param fn - function which is executed in browser context.
|
|
9651
|
-
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
9652
|
-
* @param [timeoutMsg = ''] - message to show in case of timeout fail.
|
|
9653
|
-
*/
|
|
9654
|
-
waitUntil(fn: ((...params: any[]) => any) | string, sec?: number, timeoutMsg?: string, interval?: number): void;
|
|
9655
9626
|
/**
|
|
9656
9627
|
* Switches frame or in case of null locator reverts to parent.
|
|
9657
9628
|
*
|
|
@@ -9803,7 +9774,12 @@ declare namespace CodeceptJS {
|
|
|
9803
9774
|
* add print comment method`
|
|
9804
9775
|
*/
|
|
9805
9776
|
say(msg: string, color?: string): Promise<any> | undefined;
|
|
9806
|
-
|
|
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;
|
|
9807
9783
|
}
|
|
9808
9784
|
/**
|
|
9809
9785
|
* Create CodeceptJS runner.
|
|
@@ -9947,6 +9923,34 @@ declare namespace CodeceptJS {
|
|
|
9947
9923
|
xadd(array: any[]): void;
|
|
9948
9924
|
filter(func: (...params: any[]) => any): void;
|
|
9949
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
|
+
}
|
|
9950
9954
|
namespace event {
|
|
9951
9955
|
const dispatcher: NodeJS.EventEmitter;
|
|
9952
9956
|
const test: {
|
|
@@ -10043,6 +10047,7 @@ declare namespace CodeceptJS {
|
|
|
10043
10047
|
var pause: typeof CodeceptJS.pause;
|
|
10044
10048
|
var within: typeof CodeceptJS.within;
|
|
10045
10049
|
var dataTable: typeof CodeceptJS.DataTable;
|
|
10050
|
+
var dataTableArgument: typeof CodeceptJS.DataTableArgument;
|
|
10046
10051
|
var store: typeof CodeceptJS.store;
|
|
10047
10052
|
var locator: typeof CodeceptJS.Locator;
|
|
10048
10053
|
}
|
|
@@ -10149,11 +10154,11 @@ declare namespace CodeceptJS {
|
|
|
10149
10154
|
/**
|
|
10150
10155
|
* Filters to modify locators
|
|
10151
10156
|
*/
|
|
10152
|
-
static filters:
|
|
10157
|
+
static filters: ((arg0: CodeceptJS.LocatorOrString, arg1: Locator) => void)[];
|
|
10153
10158
|
/**
|
|
10154
10159
|
* Appends new `Locator` filter to an `Locator.filters` array, and returns the new length of the array.
|
|
10155
10160
|
*/
|
|
10156
|
-
static addFilter():
|
|
10161
|
+
static addFilter(fn: (...params: any[]) => any): number;
|
|
10157
10162
|
}
|
|
10158
10163
|
namespace output {
|
|
10159
10164
|
var stepShift: number;
|
|
@@ -10243,7 +10248,7 @@ declare namespace CodeceptJS {
|
|
|
10243
10248
|
* true: it will retries if `retryOpts` set.
|
|
10244
10249
|
* false: ignore `retryOpts` and won't retry.
|
|
10245
10250
|
*/
|
|
10246
|
-
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;
|
|
10247
10252
|
retry(opts: any): any;
|
|
10248
10253
|
catch(customErrFn?: (...params: any[]) => any): Promise<any>;
|
|
10249
10254
|
catchWithoutStop(customErrFn: (...params: any[]) => any): Promise<any>;
|
|
@@ -10306,6 +10311,13 @@ declare namespace CodeceptJS {
|
|
|
10306
10311
|
args: any[];
|
|
10307
10312
|
metaStep: MetaStep;
|
|
10308
10313
|
stack: string;
|
|
10314
|
+
getTimeout(): number | undefined;
|
|
10315
|
+
/**
|
|
10316
|
+
* @param timeout - timeout in milliseconds or 0 if no timeout
|
|
10317
|
+
* @param order - order defines the priority of timeout, timeouts set with lower order override those set with higher order.
|
|
10318
|
+
* When order below 0 value of timeout only override if new value is lower
|
|
10319
|
+
*/
|
|
10320
|
+
setTimeout(timeout: number, order: number): void;
|
|
10309
10321
|
setTrace(): void;
|
|
10310
10322
|
setArguments(args: any[]): void;
|
|
10311
10323
|
run(...args: any[]): any;
|
|
@@ -10327,6 +10339,7 @@ declare namespace CodeceptJS {
|
|
|
10327
10339
|
*/
|
|
10328
10340
|
namespace store {
|
|
10329
10341
|
var debugMode: boolean;
|
|
10342
|
+
var timeouts: boolean;
|
|
10330
10343
|
}
|
|
10331
10344
|
/**
|
|
10332
10345
|
* Describe a "suite" with the given `title`
|
|
@@ -10882,3 +10895,23 @@ declare namespace CodeceptJS {
|
|
|
10882
10895
|
}
|
|
10883
10896
|
}
|
|
10884
10897
|
|
|
10898
|
+
/**
|
|
10899
|
+
* timeouts set with order below zero only override timeouts of higher order if their value is smaller
|
|
10900
|
+
*/
|
|
10901
|
+
declare var testOrSuite: any;
|
|
10902
|
+
|
|
10903
|
+
/**
|
|
10904
|
+
* 0-9 - designated for override of timeouts set from code, 5 is used by stepTimeout plugin when stepTimeout.config.overrideStepLimits=true
|
|
10905
|
+
*/
|
|
10906
|
+
declare var stepTimeoutHard: any;
|
|
10907
|
+
|
|
10908
|
+
/**
|
|
10909
|
+
* 10-19 - designated for timeouts set from code, 15 is order of I.setTimeout(t) operation
|
|
10910
|
+
*/
|
|
10911
|
+
declare var codeLimitTime: any;
|
|
10912
|
+
|
|
10913
|
+
/**
|
|
10914
|
+
* 20-29 - designated for timeout settings which could be overriden in tests code, 25 is used by stepTimeout plugin when stepTimeout.config.overrideStepLimits=false
|
|
10915
|
+
*/
|
|
10916
|
+
declare var stepTimeoutSoft: any;
|
|
10917
|
+
|