codeceptjs 3.0.3 → 3.0.7
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 +114 -18
- package/bin/codecept.js +1 -0
- package/docs/basics.md +2 -2
- package/docs/bdd.md +12 -1
- package/docs/build/Appium.js +2 -1
- package/docs/build/GraphQL.js +9 -10
- package/docs/build/Nightmare.js +4 -5
- package/docs/build/Playwright.js +164 -37
- package/docs/build/Protractor.js +1 -1
- package/docs/build/Puppeteer.js +1 -1
- package/docs/build/REST.js +24 -4
- package/docs/build/TestCafe.js +1 -1
- package/docs/build/WebDriver.js +85 -17
- package/docs/changelog.md +114 -18
- package/docs/data.md +5 -5
- package/docs/detox.md +2 -2
- package/docs/docker.md +11 -11
- package/docs/email.md +8 -8
- package/docs/helpers/Appium.md +1 -1
- package/docs/helpers/Nightmare.md +4 -5
- package/docs/helpers/Playwright.md +94 -64
- package/docs/helpers/Protractor.md +1 -1
- package/docs/helpers/Puppeteer.md +1 -1
- package/docs/helpers/REST.md +9 -0
- package/docs/helpers/TestCafe.md +1 -1
- package/docs/helpers/WebDriver.md +2 -1
- package/docs/locators.md +29 -2
- package/docs/mobile-react-native-locators.md +2 -2
- package/docs/mobile.md +3 -3
- package/docs/nightmare.md +0 -5
- package/docs/pageobjects.md +3 -1
- package/docs/parallel.md +35 -10
- package/docs/playwright.md +55 -8
- package/docs/plugins.md +73 -29
- package/docs/reports.md +8 -7
- package/docs/typescript.md +47 -5
- package/docs/webapi/fillField.mustache +1 -1
- package/lib/cli.js +25 -10
- package/lib/codecept.js +9 -1
- package/lib/command/interactive.js +10 -9
- package/lib/command/run.js +1 -1
- package/lib/command/workers/runTests.js +11 -6
- package/lib/config.js +8 -3
- package/lib/event.js +2 -0
- package/lib/helper/Appium.js +1 -0
- package/lib/helper/GraphQL.js +9 -10
- package/lib/helper/Nightmare.js +1 -1
- package/lib/helper/Playwright.js +131 -38
- package/lib/helper/REST.js +24 -4
- package/lib/helper/WebDriver.js +84 -16
- package/lib/interfaces/gherkin.js +11 -4
- package/lib/output.js +7 -4
- package/lib/plugin/allure.js +3 -7
- package/lib/plugin/fakerTransform.js +51 -0
- package/lib/plugin/screenshotOnFail.js +6 -2
- package/lib/recorder.js +9 -0
- package/lib/step.js +2 -1
- package/lib/transform.js +26 -0
- package/lib/ui.js +6 -2
- package/lib/within.js +1 -1
- package/lib/workers.js +39 -25
- package/package.json +14 -9
- package/typings/index.d.ts +49 -21
- package/typings/types.d.ts +72 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeceptjs",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "Supercharged End 2 End Testing Framework for NodeJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"acceptance",
|
|
@@ -55,13 +55,14 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@codeceptjs/configure": "^0.6.2",
|
|
58
|
-
"@codeceptjs/helper": "^1.0.
|
|
58
|
+
"@codeceptjs/helper": "^1.0.2",
|
|
59
59
|
"acorn": "^7.4.1",
|
|
60
60
|
"allure-js-commons": "^1.3.2",
|
|
61
61
|
"arrify": "^2.0.1",
|
|
62
|
-
"axios": "^0.
|
|
62
|
+
"axios": "^0.21.1",
|
|
63
63
|
"chalk": "^4.1.0",
|
|
64
64
|
"commander": "^2.20.3",
|
|
65
|
+
"cross-spawn": "^7.0.3",
|
|
65
66
|
"css-to-xpath": "^0.1.0",
|
|
66
67
|
"cucumber-expressions": "^6.6.2",
|
|
67
68
|
"envinfo": "^7.5.1",
|
|
@@ -83,14 +84,13 @@
|
|
|
83
84
|
"promise-retry": "^1.1.1",
|
|
84
85
|
"requireg": "^0.2.2",
|
|
85
86
|
"resq": "^1.10.0",
|
|
86
|
-
"semver": "^6.2.0",
|
|
87
87
|
"sprintf-js": "^1.1.1"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@codeceptjs/detox-helper": "^1.0.2",
|
|
91
91
|
"@codeceptjs/mock-request": "^0.3.0",
|
|
92
|
-
"@pollyjs/adapter-puppeteer": "^
|
|
93
|
-
"@pollyjs/core": "^
|
|
92
|
+
"@pollyjs/adapter-puppeteer": "^5.1.0",
|
|
93
|
+
"@pollyjs/core": "^5.1.0",
|
|
94
94
|
"@types/inquirer": "^0.0.35",
|
|
95
95
|
"@types/node": "^8.10.66",
|
|
96
96
|
"@wdio/sauce-service": "^5.22.5",
|
|
@@ -103,13 +103,14 @@
|
|
|
103
103
|
"contributor-faces": "^1.0.3",
|
|
104
104
|
"documentation": "^12.3.0",
|
|
105
105
|
"dtslint": "^3.6.12",
|
|
106
|
+
"electron": "^12.0.0",
|
|
106
107
|
"eslint": "^6.8.0",
|
|
107
108
|
"eslint-config-airbnb-base": "^14.2.1",
|
|
108
109
|
"eslint-plugin-import": "^2.22.1",
|
|
109
110
|
"eslint-plugin-mocha": "^6.3.0",
|
|
110
111
|
"expect": "^26.6.2",
|
|
111
112
|
"express": "^4.17.1",
|
|
112
|
-
"faker": "^
|
|
113
|
+
"faker": "^5.5.1",
|
|
113
114
|
"form-data": "^3.0.0",
|
|
114
115
|
"graphql": "^14.6.0",
|
|
115
116
|
"husky": "^4.3.5",
|
|
@@ -119,12 +120,13 @@
|
|
|
119
120
|
"mocha-parallel-tests": "^2.3.0",
|
|
120
121
|
"nightmare": "^3.0.2",
|
|
121
122
|
"nodemon": "^1.19.4",
|
|
122
|
-
"playwright": "^1.
|
|
123
|
+
"playwright": "^1.9.1",
|
|
123
124
|
"protractor": "^5.4.4",
|
|
124
|
-
"puppeteer": "^
|
|
125
|
+
"puppeteer": "^8.0.0",
|
|
125
126
|
"qrcode-terminal": "^0.12.0",
|
|
126
127
|
"rosie": "^1.6.0",
|
|
127
128
|
"runok": "^0.9.2",
|
|
129
|
+
"semver": "^6.3.0",
|
|
128
130
|
"sinon": "^9.2.2",
|
|
129
131
|
"sinon-chai": "^3.5.0",
|
|
130
132
|
"testcafe": "^1.9.4",
|
|
@@ -141,6 +143,9 @@
|
|
|
141
143
|
"node": ">=8.9.1",
|
|
142
144
|
"npm": ">=5.6.0"
|
|
143
145
|
},
|
|
146
|
+
"peerDependencies": {
|
|
147
|
+
"faker": "^5.5.1"
|
|
148
|
+
},
|
|
144
149
|
"es6": true,
|
|
145
150
|
"husky": {
|
|
146
151
|
"hooks": {
|
package/typings/index.d.ts
CHANGED
|
@@ -8,13 +8,13 @@ declare namespace CodeceptJS {
|
|
|
8
8
|
import("./utils").Translate<T, Translation.Actions>;
|
|
9
9
|
|
|
10
10
|
type Cookie = {
|
|
11
|
-
name: string
|
|
12
|
-
value: string
|
|
13
|
-
}
|
|
11
|
+
name: string;
|
|
12
|
+
value: string;
|
|
13
|
+
};
|
|
14
14
|
|
|
15
15
|
interface PageScrollPosition {
|
|
16
|
-
x: number
|
|
17
|
-
y: number
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
// Could get extended by user generated typings
|
|
@@ -22,7 +22,9 @@ declare namespace CodeceptJS {
|
|
|
22
22
|
interface I {}
|
|
23
23
|
interface IHook {}
|
|
24
24
|
interface IScenario {}
|
|
25
|
-
interface IFeature {
|
|
25
|
+
interface IFeature {
|
|
26
|
+
(title: string): FeatureConfig;
|
|
27
|
+
}
|
|
26
28
|
interface CallbackOrder extends Array<any> {}
|
|
27
29
|
interface SupportObject {
|
|
28
30
|
I: CodeceptJS.I;
|
|
@@ -49,22 +51,48 @@ declare namespace CodeceptJS {
|
|
|
49
51
|
| { frame: string }
|
|
50
52
|
| { android: string }
|
|
51
53
|
| { ios: string }
|
|
52
|
-
| { android: string
|
|
53
|
-
| { react: string }
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
interface
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
| { android: string; ios: string }
|
|
55
|
+
| { react: string }
|
|
56
|
+
| { shadow: string }
|
|
57
|
+
| { custom: string };
|
|
58
|
+
|
|
59
|
+
interface CustomLocators {}
|
|
60
|
+
type LocatorOrString =
|
|
61
|
+
| string
|
|
62
|
+
| ILocator
|
|
63
|
+
| Locator
|
|
64
|
+
| CustomLocators[keyof CustomLocators];
|
|
65
|
+
|
|
66
|
+
type StringOrSecret = string | CodeceptJS.Secret;
|
|
67
|
+
|
|
68
|
+
interface HookCallback {
|
|
69
|
+
(args: SupportObject): void;
|
|
70
|
+
}
|
|
71
|
+
interface Scenario extends IScenario {
|
|
72
|
+
only: IScenario;
|
|
73
|
+
skip: IScenario;
|
|
74
|
+
todo: IScenario;
|
|
75
|
+
}
|
|
76
|
+
interface Feature extends IFeature {
|
|
77
|
+
skip: IFeature;
|
|
78
|
+
}
|
|
79
|
+
interface IData {
|
|
80
|
+
Scenario: IScenario;
|
|
81
|
+
only: { Scenario: IScenario };
|
|
82
|
+
}
|
|
61
83
|
|
|
62
84
|
interface IScenario {
|
|
63
85
|
// Scenario.todo can be called only with a title.
|
|
64
86
|
(title: string, callback?: HookCallback): ScenarioConfig;
|
|
65
|
-
(
|
|
87
|
+
(
|
|
88
|
+
title: string,
|
|
89
|
+
opts: { [key: string]: any },
|
|
90
|
+
callback: HookCallback
|
|
91
|
+
): ScenarioConfig;
|
|
92
|
+
}
|
|
93
|
+
interface IHook {
|
|
94
|
+
(callback: HookCallback): void;
|
|
66
95
|
}
|
|
67
|
-
interface IHook { (callback: HookCallback): void; }
|
|
68
96
|
|
|
69
97
|
interface Globals {
|
|
70
98
|
codeceptjs: typeof codeceptjs;
|
|
@@ -159,12 +187,12 @@ declare namespace Mocha {
|
|
|
159
187
|
}
|
|
160
188
|
|
|
161
189
|
interface Suite extends SuiteRunnable {
|
|
162
|
-
tags: any[]
|
|
163
|
-
comment: string
|
|
164
|
-
feature: any
|
|
190
|
+
tags: any[];
|
|
191
|
+
comment: string;
|
|
192
|
+
feature: any;
|
|
165
193
|
}
|
|
166
194
|
|
|
167
|
-
interface Test
|
|
195
|
+
interface Test extends Runnable {
|
|
168
196
|
tags: any[];
|
|
169
197
|
}
|
|
170
198
|
}
|
package/typings/types.d.ts
CHANGED
|
@@ -862,7 +862,7 @@ declare namespace CodeceptJS {
|
|
|
862
862
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
863
863
|
* @param value - text value to fill.
|
|
864
864
|
*/
|
|
865
|
-
fillField(field: CodeceptJS.LocatorOrString, value:
|
|
865
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
866
866
|
/**
|
|
867
867
|
* Retrieves all texts from an element located by CSS or XPath and returns it to test.
|
|
868
868
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -1847,7 +1847,7 @@ declare namespace CodeceptJS {
|
|
|
1847
1847
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
1848
1848
|
* @param value - text value to fill.
|
|
1849
1849
|
*/
|
|
1850
|
-
fillField(field: CodeceptJS.LocatorOrString, value:
|
|
1850
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
1851
1851
|
/**
|
|
1852
1852
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
1853
1853
|
*
|
|
@@ -1973,17 +1973,16 @@ declare namespace CodeceptJS {
|
|
|
1973
1973
|
*/
|
|
1974
1974
|
grabTextFrom(locator: CodeceptJS.LocatorOrString): Promise<string>;
|
|
1975
1975
|
/**
|
|
1976
|
-
* Retrieves
|
|
1976
|
+
* Retrieves an array of value from a form located by CSS or XPath and returns it to test.
|
|
1977
1977
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
1978
|
-
* If more than one element is found - value of first element is returned.
|
|
1979
1978
|
*
|
|
1980
1979
|
* ```js
|
|
1981
|
-
* let
|
|
1980
|
+
* let inputs = await I.grabValueFromAll('//form/input');
|
|
1982
1981
|
* ```
|
|
1983
1982
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
1984
1983
|
* @returns attribute value
|
|
1985
1984
|
*/
|
|
1986
|
-
grabValueFromAll(locator: CodeceptJS.LocatorOrString): Promise<string>;
|
|
1985
|
+
grabValueFromAll(locator: CodeceptJS.LocatorOrString): Promise<string[]>;
|
|
1987
1986
|
/**
|
|
1988
1987
|
* Retrieves a value from a form element located by CSS or XPath and returns it to test.
|
|
1989
1988
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -2364,7 +2363,7 @@ declare namespace CodeceptJS {
|
|
|
2364
2363
|
* This helper should be configured in codecept.json or codecept.conf.js
|
|
2365
2364
|
*
|
|
2366
2365
|
* * `url`: base url of website to be tested
|
|
2367
|
-
* * `browser`: a browser to test on, either: `chromium`, `firefox`, `webkit`. Default: chromium.
|
|
2366
|
+
* * `browser`: a browser to test on, either: `chromium`, `firefox`, `webkit`, `electron`. Default: chromium.
|
|
2368
2367
|
* * `show`: (optional, default: false) - show browser window.
|
|
2369
2368
|
* * `restart`: (optional, default: true) - restart browser between tests.
|
|
2370
2369
|
* * `disableScreenshots`: (optional, default: false) - don't save screenshot on failure.
|
|
@@ -2383,6 +2382,7 @@ declare namespace CodeceptJS {
|
|
|
2383
2382
|
* * `userAgent`: (optional) user-agent string.
|
|
2384
2383
|
* * `manualStart`: (optional, default: false) - do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
|
|
2385
2384
|
* * `chromium`: (optional) pass additional chromium options
|
|
2385
|
+
* * `electron`: (optional) pass additional electron options
|
|
2386
2386
|
*
|
|
2387
2387
|
* #### Example #1: Wait for 0 network connections.
|
|
2388
2388
|
*
|
|
@@ -2427,7 +2427,7 @@ declare namespace CodeceptJS {
|
|
|
2427
2427
|
* }
|
|
2428
2428
|
* ```
|
|
2429
2429
|
*
|
|
2430
|
-
* #### Example #4: Connect to remote browser by specifying [websocket endpoint](https://
|
|
2430
|
+
* #### Example #4: Connect to remote browser by specifying [websocket endpoint](https://playwright.dev/docs/api/class-browsertype#browsertypeconnectparams)
|
|
2431
2431
|
*
|
|
2432
2432
|
* ```js
|
|
2433
2433
|
* {
|
|
@@ -2435,7 +2435,7 @@ declare namespace CodeceptJS {
|
|
|
2435
2435
|
* Playwright: {
|
|
2436
2436
|
* url: "http://localhost",
|
|
2437
2437
|
* chromium: {
|
|
2438
|
-
* browserWSEndpoint:
|
|
2438
|
+
* browserWSEndpoint: { wsEndpoint: 'ws://localhost:9222/devtools/browser/c5aa6160-b5bc-4d53-bb49-6ecb36cd2e0a' }
|
|
2439
2439
|
* }
|
|
2440
2440
|
* }
|
|
2441
2441
|
* }
|
|
@@ -2453,6 +2453,7 @@ declare namespace CodeceptJS {
|
|
|
2453
2453
|
* url: "http://localhost",
|
|
2454
2454
|
* show: true // headless mode not supported for extensions
|
|
2455
2455
|
* chromium: {
|
|
2456
|
+
* userDataDir: '/tmp/playwright-tmp', // necessary to launch the browser in normal mode instead of incognito,
|
|
2456
2457
|
* args: [
|
|
2457
2458
|
* `--disable-extensions-except=${pathToExtension}`,
|
|
2458
2459
|
* `--load-extension=${pathToExtension}`
|
|
@@ -2705,11 +2706,12 @@ declare namespace CodeceptJS {
|
|
|
2705
2706
|
/**
|
|
2706
2707
|
* Checks that title is equal to provided one.
|
|
2707
2708
|
*
|
|
2708
|
-
*
|
|
2709
|
-
*
|
|
2710
|
-
*
|
|
2709
|
+
* ```js
|
|
2710
|
+
* I.seeTitleEquals('Test title.');
|
|
2711
|
+
* ```
|
|
2712
|
+
* @param text - value to check.
|
|
2711
2713
|
*/
|
|
2712
|
-
seeTitleEquals(): void;
|
|
2714
|
+
seeTitleEquals(text: string): void;
|
|
2713
2715
|
/**
|
|
2714
2716
|
* Checks that title does not contain text.
|
|
2715
2717
|
*
|
|
@@ -2907,14 +2909,34 @@ declare namespace CodeceptJS {
|
|
|
2907
2909
|
*/
|
|
2908
2910
|
clickLink(): void;
|
|
2909
2911
|
/**
|
|
2910
|
-
*
|
|
2912
|
+
* Perform an emulated click on a link or a button, given by a locator.
|
|
2913
|
+
* Unlike normal click instead of sending native event, emulates a click with JavaScript.
|
|
2914
|
+
* This works on hidden, animated or inactive elements as well.
|
|
2915
|
+
*
|
|
2916
|
+
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
|
2917
|
+
* For buttons, the "value" attribute, "name" attribute, and inner text are searched. For links, the link text is searched.
|
|
2918
|
+
* For images, the "alt" attribute and inner text of any parent links are searched.
|
|
2919
|
+
*
|
|
2920
|
+
* The second parameter is a context (CSS or XPath locator) to narrow the search.
|
|
2911
2921
|
*
|
|
2912
2922
|
* ```js
|
|
2913
|
-
*
|
|
2914
|
-
* I.forceClick('
|
|
2923
|
+
* // simple link
|
|
2924
|
+
* I.forceClick('Logout');
|
|
2925
|
+
* // button of form
|
|
2926
|
+
* I.forceClick('Submit');
|
|
2927
|
+
* // CSS button
|
|
2928
|
+
* I.forceClick('#form input[type=submit]');
|
|
2929
|
+
* // XPath
|
|
2930
|
+
* I.forceClick('//form/*[@type=submit]');
|
|
2931
|
+
* // link in context
|
|
2932
|
+
* I.forceClick('Logout', '#nav');
|
|
2933
|
+
* // using strict locator
|
|
2934
|
+
* I.forceClick({css: 'nav a.login'});
|
|
2915
2935
|
* ```
|
|
2936
|
+
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
2937
|
+
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
2916
2938
|
*/
|
|
2917
|
-
forceClick(): void;
|
|
2939
|
+
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
2918
2940
|
/**
|
|
2919
2941
|
* Performs a double-click on an element matched by link|button|label|CSS or XPath.
|
|
2920
2942
|
* Context can be specified as second parameter to narrow search.
|
|
@@ -3122,7 +3144,7 @@ declare namespace CodeceptJS {
|
|
|
3122
3144
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3123
3145
|
* @param value - text value to fill.
|
|
3124
3146
|
*/
|
|
3125
|
-
fillField(field: CodeceptJS.LocatorOrString, value:
|
|
3147
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
3126
3148
|
/**
|
|
3127
3149
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
3128
3150
|
*
|
|
@@ -3442,8 +3464,14 @@ declare namespace CodeceptJS {
|
|
|
3442
3464
|
* I.executeScript(([x, y]) => x + y, [x, y]);
|
|
3443
3465
|
* ```
|
|
3444
3466
|
* If a function returns a Promise it will wait for its resolution.
|
|
3467
|
+
* @param fn - function to be executed in browser context.
|
|
3468
|
+
* @param [arg] - optional argument to pass to the function
|
|
3445
3469
|
*/
|
|
3446
|
-
executeScript():
|
|
3470
|
+
executeScript(fn: string | ((...params: any[]) => any), arg?: any): Promise<any>;
|
|
3471
|
+
/**
|
|
3472
|
+
* Grab Locator if called within Context
|
|
3473
|
+
*/
|
|
3474
|
+
_contextLocator(locator: any): void;
|
|
3447
3475
|
/**
|
|
3448
3476
|
* Retrieves a text from an element located by CSS or XPath and returns it to test.
|
|
3449
3477
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -3803,7 +3831,7 @@ declare namespace CodeceptJS {
|
|
|
3803
3831
|
/**
|
|
3804
3832
|
* Waits for navigation to finish. By default takes configured `waitForNavigation` option.
|
|
3805
3833
|
*
|
|
3806
|
-
* See [
|
|
3834
|
+
* See [Playwright's reference](https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions)
|
|
3807
3835
|
*/
|
|
3808
3836
|
waitForNavigation(opts: any): void;
|
|
3809
3837
|
/**
|
|
@@ -4243,7 +4271,7 @@ declare namespace CodeceptJS {
|
|
|
4243
4271
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4244
4272
|
* @param value - text value to fill.
|
|
4245
4273
|
*/
|
|
4246
|
-
fillField(field: CodeceptJS.LocatorOrString, value:
|
|
4274
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
4247
4275
|
/**
|
|
4248
4276
|
* Presses a key on a focused element.
|
|
4249
4277
|
* Special keys like 'Enter', 'Control', [etc](https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value)
|
|
@@ -5961,7 +5989,7 @@ declare namespace CodeceptJS {
|
|
|
5961
5989
|
*
|
|
5962
5990
|
* {{ react }}
|
|
5963
5991
|
*/
|
|
5964
|
-
fillField(field: CodeceptJS.LocatorOrString, value:
|
|
5992
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
5965
5993
|
/**
|
|
5966
5994
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
5967
5995
|
*
|
|
@@ -6850,6 +6878,10 @@ declare namespace CodeceptJS {
|
|
|
6850
6878
|
*
|
|
6851
6879
|
* ```js
|
|
6852
6880
|
* I.sendPostRequest('/api/users.json', { "email": "user@user.com" });
|
|
6881
|
+
*
|
|
6882
|
+
* // To mask the payload in logs
|
|
6883
|
+
* I.sendPostRequest('/api/users.json', secret({ "email": "user@user.com" }));
|
|
6884
|
+
*
|
|
6853
6885
|
* ```
|
|
6854
6886
|
* @param [payload = {}] - the payload to be sent. By default it is sent as an empty object
|
|
6855
6887
|
* @param [headers = {}] - the headers object to be sent. By default it is sent as an empty object
|
|
@@ -6860,6 +6892,10 @@ declare namespace CodeceptJS {
|
|
|
6860
6892
|
*
|
|
6861
6893
|
* ```js
|
|
6862
6894
|
* I.sendPatchRequest('/api/users.json', { "email": "user@user.com" });
|
|
6895
|
+
*
|
|
6896
|
+
* // To mask the payload in logs
|
|
6897
|
+
* I.sendPatchRequest('/api/users.json', secret({ "email": "user@user.com" }));
|
|
6898
|
+
*
|
|
6863
6899
|
* ```
|
|
6864
6900
|
* @param [payload = {}] - the payload to be sent. By default it is sent as an empty object
|
|
6865
6901
|
* @param [headers = {}] - the headers object to be sent. By default it is sent as an empty object
|
|
@@ -6870,6 +6906,10 @@ declare namespace CodeceptJS {
|
|
|
6870
6906
|
*
|
|
6871
6907
|
* ```js
|
|
6872
6908
|
* I.sendPutRequest('/api/users.json', { "email": "user@user.com" });
|
|
6909
|
+
*
|
|
6910
|
+
* // To mask the payload in logs
|
|
6911
|
+
* I.sendPutRequest('/api/users.json', secret({ "email": "user@user.com" }));
|
|
6912
|
+
*
|
|
6873
6913
|
* ```
|
|
6874
6914
|
* @param [payload = {}] - the payload to be sent. By default it is sent as an empty object
|
|
6875
6915
|
* @param [headers = {}] - the headers object to be sent. By default it is sent as an empty object
|
|
@@ -7130,7 +7170,7 @@ declare namespace CodeceptJS {
|
|
|
7130
7170
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7131
7171
|
* @param value - text value to fill.
|
|
7132
7172
|
*/
|
|
7133
|
-
fillField(field: CodeceptJS.LocatorOrString, value:
|
|
7173
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
7134
7174
|
/**
|
|
7135
7175
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
7136
7176
|
*
|
|
@@ -8417,8 +8457,9 @@ declare namespace CodeceptJS {
|
|
|
8417
8457
|
* @param value - text value to fill.
|
|
8418
8458
|
*
|
|
8419
8459
|
* {{ react }}
|
|
8460
|
+
* {{ custom }}
|
|
8420
8461
|
*/
|
|
8421
|
-
fillField(field: CodeceptJS.LocatorOrString, value:
|
|
8462
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
8422
8463
|
/**
|
|
8423
8464
|
* Appends text to a input field or textarea.
|
|
8424
8465
|
* Field is located by name, label, CSS or XPath
|
|
@@ -9719,7 +9760,7 @@ declare namespace CodeceptJS {
|
|
|
9719
9760
|
/**
|
|
9720
9761
|
* Get current config.
|
|
9721
9762
|
*/
|
|
9722
|
-
static get(key
|
|
9763
|
+
static get(key?: string, val?: any): any;
|
|
9723
9764
|
/**
|
|
9724
9765
|
* Appends values to current config
|
|
9725
9766
|
*/
|
|
@@ -9834,6 +9875,7 @@ declare namespace CodeceptJS {
|
|
|
9834
9875
|
before: 'global.before';
|
|
9835
9876
|
after: 'global.after';
|
|
9836
9877
|
result: 'global.result';
|
|
9878
|
+
failures: 'global.failures';
|
|
9837
9879
|
};
|
|
9838
9880
|
const multiple: {
|
|
9839
9881
|
before: 'multiple.before';
|
|
@@ -10014,7 +10056,7 @@ declare namespace CodeceptJS {
|
|
|
10014
10056
|
* Print information for a process
|
|
10015
10057
|
* Used in multiple-run
|
|
10016
10058
|
*/
|
|
10017
|
-
function process(process: string): string;
|
|
10059
|
+
function process(process: string | null): string;
|
|
10018
10060
|
/**
|
|
10019
10061
|
* Print information in --debug mode
|
|
10020
10062
|
*/
|
|
@@ -10115,6 +10157,10 @@ declare namespace CodeceptJS {
|
|
|
10115
10157
|
* Get a list of all chained tasks
|
|
10116
10158
|
*/
|
|
10117
10159
|
scheduled(): string;
|
|
10160
|
+
/**
|
|
10161
|
+
* Get the queue id
|
|
10162
|
+
*/
|
|
10163
|
+
getQueueId(): number;
|
|
10118
10164
|
/**
|
|
10119
10165
|
* Get a state of current queue and tasks
|
|
10120
10166
|
*/
|