codeceptjs 3.3.5 → 3.3.6
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 +37 -7
- package/bin/codecept.js +40 -3
- package/docs/basics.md +24 -1
- package/docs/build/Appium.js +41 -22
- package/docs/build/FileSystem.js +1 -1
- package/docs/build/Nightmare.js +106 -57
- package/docs/build/Playwright.js +187 -111
- package/docs/build/Protractor.js +132 -70
- package/docs/build/Puppeteer.js +143 -76
- package/docs/build/REST.js +2 -2
- package/docs/build/TestCafe.js +107 -57
- package/docs/build/WebDriver.js +162 -89
- package/docs/changelog.md +37 -7
- package/docs/commands.md +5 -3
- package/docs/configuration.md +5 -5
- package/docs/helpers/Appium.md +25 -23
- package/docs/helpers/FileSystem.md +1 -1
- package/docs/helpers/Nightmare.md +57 -57
- package/docs/helpers/Playwright.md +76 -75
- package/docs/helpers/Puppeteer.md +76 -85
- package/docs/helpers/REST.md +1 -1
- package/docs/helpers/TestCafe.md +57 -57
- package/docs/helpers/WebDriver.md +84 -97
- package/docs/quickstart.md +1 -1
- package/docs/reports.md +1 -1
- package/docs/secrets.md +1 -1
- package/docs/webapi/appendField.mustache +1 -1
- package/docs/webapi/attachFile.mustache +3 -3
- package/docs/webapi/checkOption.mustache +1 -1
- package/docs/webapi/clearCookie.mustache +1 -1
- package/docs/webapi/clearField.mustache +1 -1
- package/docs/webapi/click.mustache +1 -1
- package/docs/webapi/clickLink.mustache +1 -1
- package/docs/webapi/closeCurrentTab.mustache +1 -1
- package/docs/webapi/closeOtherTabs.mustache +1 -1
- package/docs/webapi/dontSee.mustache +1 -1
- package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -1
- package/docs/webapi/dontSeeCookie.mustache +1 -1
- package/docs/webapi/dontSeeCurrentUrlEquals.mustache +1 -1
- package/docs/webapi/dontSeeElement.mustache +1 -1
- package/docs/webapi/dontSeeElementInDOM.mustache +1 -1
- package/docs/webapi/dontSeeInCurrentUrl.mustache +1 -1
- package/docs/webapi/dontSeeInField.mustache +1 -1
- package/docs/webapi/dontSeeInSource.mustache +1 -1
- package/docs/webapi/dontSeeInTitle.mustache +1 -1
- package/docs/webapi/doubleClick.mustache +1 -1
- package/docs/webapi/downloadFile.mustache +1 -1
- package/docs/webapi/dragAndDrop.mustache +1 -1
- package/docs/webapi/dragSlider.mustache +1 -1
- package/docs/webapi/executeAsyncScript.mustache +1 -1
- package/docs/webapi/executeScript.mustache +1 -1
- package/docs/webapi/fillField.mustache +1 -1
- package/docs/webapi/forceClick.mustache +1 -1
- package/docs/webapi/forceRightClick.mustache +1 -1
- package/docs/webapi/moveCursorTo.mustache +1 -1
- package/docs/webapi/openNewTab.mustache +1 -1
- package/docs/webapi/pressKey.mustache +1 -1
- package/docs/webapi/pressKeyDown.mustache +1 -1
- package/docs/webapi/pressKeyUp.mustache +1 -1
- package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -1
- package/docs/webapi/refreshPage.mustache +1 -1
- package/docs/webapi/resizeWindow.mustache +1 -1
- package/docs/webapi/rightClick.mustache +1 -1
- package/docs/webapi/saveElementScreenshot.mustache +2 -2
- package/docs/webapi/saveScreenshot.mustache +2 -2
- package/docs/webapi/say.mustache +1 -1
- package/docs/webapi/scrollIntoView.mustache +1 -1
- package/docs/webapi/scrollPageToBottom.mustache +1 -1
- package/docs/webapi/scrollPageToTop.mustache +1 -1
- package/docs/webapi/scrollTo.mustache +1 -1
- package/docs/webapi/see.mustache +1 -1
- package/docs/webapi/seeAttributesOnElements.mustache +1 -1
- package/docs/webapi/seeCheckboxIsChecked.mustache +1 -1
- package/docs/webapi/seeCookie.mustache +1 -1
- package/docs/webapi/seeCssPropertiesOnElements.mustache +1 -1
- package/docs/webapi/seeCurrentUrlEquals.mustache +1 -1
- package/docs/webapi/seeElement.mustache +1 -1
- package/docs/webapi/seeElementInDOM.mustache +1 -1
- package/docs/webapi/seeInCurrentUrl.mustache +1 -1
- package/docs/webapi/seeInField.mustache +1 -1
- package/docs/webapi/seeInPopup.mustache +1 -1
- package/docs/webapi/seeInSource.mustache +1 -1
- package/docs/webapi/seeInTitle.mustache +1 -1
- package/docs/webapi/seeNumberOfElements.mustache +1 -1
- package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -1
- package/docs/webapi/seeTextEquals.mustache +1 -1
- package/docs/webapi/seeTitleEquals.mustache +1 -1
- package/docs/webapi/selectOption.mustache +1 -1
- package/docs/webapi/setCookie.mustache +1 -1
- package/docs/webapi/setGeoLocation.mustache +1 -1
- package/docs/webapi/switchTo.mustache +1 -1
- package/docs/webapi/switchToNextTab.mustache +1 -1
- package/docs/webapi/switchToPreviousTab.mustache +1 -1
- package/docs/webapi/type.mustache +1 -1
- package/docs/webapi/uncheckOption.mustache +1 -1
- package/docs/webapi/wait.mustache +1 -1
- package/docs/webapi/waitForClickable.mustache +1 -1
- package/docs/webapi/waitForDetached.mustache +1 -1
- package/docs/webapi/waitForElement.mustache +1 -1
- package/docs/webapi/waitForEnabled.mustache +1 -1
- package/docs/webapi/waitForFunction.mustache +1 -1
- package/docs/webapi/waitForInvisible.mustache +1 -1
- package/docs/webapi/waitForText.mustache +1 -1
- package/docs/webapi/waitForValue.mustache +1 -1
- package/docs/webapi/waitForVisible.mustache +1 -1
- package/docs/webapi/waitInUrl.mustache +1 -1
- package/docs/webapi/waitNumberOfVisibleElements.mustache +1 -1
- package/docs/webapi/waitToHide.mustache +1 -1
- package/docs/webapi/waitUrlEquals.mustache +1 -1
- package/lib/command/configMigrate.js +1 -1
- package/lib/command/dryRun.js +2 -1
- package/lib/command/generate.js +35 -18
- package/lib/command/run-rerun.js +38 -0
- package/lib/command/utils.js +13 -3
- package/lib/config.js +2 -2
- package/lib/data/context.js +7 -0
- package/lib/helper/Appium.js +6 -4
- package/lib/helper/FileSystem.js +1 -1
- package/lib/helper/Nightmare.js +1 -1
- package/lib/helper/Playwright.js +48 -38
- package/lib/helper/Protractor.js +1 -1
- package/lib/helper/REST.js +2 -2
- package/lib/helper/TestCafe.js +1 -1
- package/lib/helper/WebDriver.js +7 -7
- package/lib/plugin/wdio.js +11 -2
- package/lib/utils.js +3 -0
- package/package.json +2 -2
- package/typings/index.d.ts +46 -46
- package/typings/types.d.ts +497 -443
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeceptjs",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.6",
|
|
4
4
|
"description": "Supercharged End 2 End Testing Framework for NodeJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"acceptance",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"requireg": "^0.2.2",
|
|
88
88
|
"resq": "^1.10.2",
|
|
89
89
|
"sprintf-js": "^1.1.1",
|
|
90
|
+
"semver": "^6.3.0",
|
|
90
91
|
"uuid": "^8.3.2"
|
|
91
92
|
},
|
|
92
93
|
"devDependencies": {
|
|
@@ -127,7 +128,6 @@
|
|
|
127
128
|
"qrcode-terminal": "^0.12.0",
|
|
128
129
|
"rosie": "^1.6.0",
|
|
129
130
|
"runok": "^0.9.2",
|
|
130
|
-
"semver": "^6.3.0",
|
|
131
131
|
"sinon": "^9.2.4",
|
|
132
132
|
"sinon-chai": "^3.7.0",
|
|
133
133
|
"testcafe": "^1.18.3",
|
package/typings/index.d.ts
CHANGED
|
@@ -32,20 +32,20 @@ declare namespace CodeceptJS {
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
tests: string;
|
|
35
|
-
/**
|
|
36
|
-
* Where to store failure screenshots, artifacts, etc
|
|
37
|
-
*
|
|
35
|
+
/**
|
|
36
|
+
* Where to store failure screenshots, artifacts, etc
|
|
37
|
+
*
|
|
38
38
|
* ```js
|
|
39
39
|
* output: './output'
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
42
|
output: string;
|
|
43
|
-
/**
|
|
43
|
+
/**
|
|
44
44
|
* Pattern to filter tests by name.
|
|
45
45
|
* This option is useful if you plan to use multiple configs for different environments.
|
|
46
|
-
*
|
|
46
|
+
*
|
|
47
47
|
* To execute only tests with @firefox tag
|
|
48
|
-
*
|
|
48
|
+
*
|
|
49
49
|
* ```js
|
|
50
50
|
* grep: '@firefox'
|
|
51
51
|
* ```
|
|
@@ -64,11 +64,11 @@ declare namespace CodeceptJS {
|
|
|
64
64
|
* ```
|
|
65
65
|
*/
|
|
66
66
|
helpers?: {
|
|
67
|
-
/**
|
|
68
|
-
* Run web tests controlling browsers via Playwright engine.
|
|
67
|
+
/**
|
|
68
|
+
* Run web tests controlling browsers via Playwright engine.
|
|
69
|
+
*
|
|
70
|
+
* https://codecept.io/helpers/playwright
|
|
69
71
|
*
|
|
70
|
-
* https://codecept.io/helpers/playwright
|
|
71
|
-
*
|
|
72
72
|
* Available commands:
|
|
73
73
|
* ```js
|
|
74
74
|
* I.amOnPage('/');
|
|
@@ -77,11 +77,11 @@ declare namespace CodeceptJS {
|
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
79
|
Playwright?: PlaywrightConfig;
|
|
80
|
-
/**
|
|
81
|
-
* Run web tests controlling browsers via Puppeteer engine.
|
|
82
|
-
*
|
|
83
|
-
* https://codecept.io/helpers/puppeteer
|
|
84
|
-
*
|
|
80
|
+
/**
|
|
81
|
+
* Run web tests controlling browsers via Puppeteer engine.
|
|
82
|
+
*
|
|
83
|
+
* https://codecept.io/helpers/puppeteer
|
|
84
|
+
*
|
|
85
85
|
* Available commands:
|
|
86
86
|
* ```js
|
|
87
87
|
* I.amOnPage('/');
|
|
@@ -91,24 +91,24 @@ declare namespace CodeceptJS {
|
|
|
91
91
|
*/
|
|
92
92
|
Puppeteer?: PuppeteerConfig;
|
|
93
93
|
|
|
94
|
-
/**
|
|
95
|
-
* Run web tests controlling browsers via WebDriver engine.
|
|
96
|
-
*
|
|
94
|
+
/**
|
|
95
|
+
* Run web tests controlling browsers via WebDriver engine.
|
|
96
|
+
*
|
|
97
97
|
* Available commands:
|
|
98
98
|
* ```js
|
|
99
99
|
* I.amOnPage('/');
|
|
100
100
|
* I.click('Open');
|
|
101
101
|
* I.see('Welcome');
|
|
102
102
|
* ```
|
|
103
|
-
*
|
|
104
|
-
* https://codecept.io/helpers/webdriver
|
|
103
|
+
*
|
|
104
|
+
* https://codecept.io/helpers/webdriver
|
|
105
105
|
*/
|
|
106
106
|
WebDriver?: WebDriverConfig;
|
|
107
|
-
/**
|
|
108
|
-
* Execute REST API requests for API testing or to assist web testing.
|
|
109
|
-
*
|
|
110
|
-
* https://codecept.io/helpers/REST
|
|
111
|
-
*
|
|
107
|
+
/**
|
|
108
|
+
* Execute REST API requests for API testing or to assist web testing.
|
|
109
|
+
*
|
|
110
|
+
* https://codecept.io/helpers/REST
|
|
111
|
+
*
|
|
112
112
|
* Available commands:
|
|
113
113
|
* ```js
|
|
114
114
|
* I.sendGetRequest('/');
|
|
@@ -116,30 +116,30 @@ declare namespace CodeceptJS {
|
|
|
116
116
|
*/
|
|
117
117
|
REST?: RESTConfig;
|
|
118
118
|
|
|
119
|
-
/**
|
|
119
|
+
/**
|
|
120
120
|
* Use JSON assertions for API testing.
|
|
121
121
|
* Can be paired with REST or GraphQL helpers.
|
|
122
|
-
*
|
|
123
|
-
* https://codecept.io/helpers/JSONResponse
|
|
124
|
-
*
|
|
122
|
+
*
|
|
123
|
+
* https://codecept.io/helpers/JSONResponse
|
|
124
|
+
*
|
|
125
125
|
* Available commands:
|
|
126
126
|
* ```js
|
|
127
127
|
* I.seeResponseContainsJson({ user: { email: 'jon@doe.com' } });
|
|
128
128
|
* ```
|
|
129
129
|
*/
|
|
130
|
-
JSONResponse?: any;
|
|
130
|
+
JSONResponse?: any;
|
|
131
131
|
|
|
132
132
|
[key: string]: any;
|
|
133
133
|
},
|
|
134
|
-
/**
|
|
135
|
-
* Enable CodeceptJS plugins.
|
|
136
|
-
*
|
|
134
|
+
/**
|
|
135
|
+
* Enable CodeceptJS plugins.
|
|
136
|
+
*
|
|
137
137
|
* https://codecept.io/plugins/
|
|
138
|
-
*
|
|
138
|
+
*
|
|
139
139
|
* Plugins listen to test events and extend functionality of CodeceptJS.
|
|
140
|
-
*
|
|
140
|
+
*
|
|
141
141
|
* Example:
|
|
142
|
-
*
|
|
142
|
+
*
|
|
143
143
|
* ```js
|
|
144
144
|
* plugins: {
|
|
145
145
|
* autoDelay: {
|
|
@@ -195,7 +195,7 @@ declare namespace CodeceptJS {
|
|
|
195
195
|
mocha?: any;
|
|
196
196
|
/**
|
|
197
197
|
* [Execute code before](https://codecept.io/bootstrap/) tests are run.
|
|
198
|
-
*
|
|
198
|
+
*
|
|
199
199
|
* Can be either JS module file or async function:
|
|
200
200
|
*
|
|
201
201
|
* ```js
|
|
@@ -206,10 +206,10 @@ declare namespace CodeceptJS {
|
|
|
206
206
|
* bootstrap: 'bootstrap.js',
|
|
207
207
|
* ```
|
|
208
208
|
*/
|
|
209
|
-
bootstrap?: () => Promise<void> | boolean | string;
|
|
209
|
+
bootstrap?: (() => Promise<void>) | boolean | string;
|
|
210
210
|
/**
|
|
211
|
-
* [Execute code after tests](https://codecept.io/bootstrap/) finished.
|
|
212
|
-
*
|
|
211
|
+
* [Execute code after tests](https://codecept.io/bootstrap/) finished.
|
|
212
|
+
*
|
|
213
213
|
* Can be either JS module file or async function:
|
|
214
214
|
*
|
|
215
215
|
* ```js
|
|
@@ -220,16 +220,16 @@ declare namespace CodeceptJS {
|
|
|
220
220
|
* teardown: 'teardown.js',
|
|
221
221
|
* ```
|
|
222
222
|
*/
|
|
223
|
-
teardown?: () => Promise<void> | boolean | string;
|
|
223
|
+
teardown?: (() => Promise<void>) | boolean | string;
|
|
224
224
|
/**
|
|
225
225
|
* [Execute code before launching tests in parallel mode](https://codecept.io/bootstrap/#bootstrapall-teardownall)
|
|
226
|
-
*
|
|
226
|
+
*
|
|
227
227
|
*/
|
|
228
|
-
bootstrapAll?: () => Promise<void> | boolean | string;
|
|
228
|
+
bootstrapAll?: (() => Promise<void>) | boolean | string;
|
|
229
229
|
/**
|
|
230
230
|
* [Execute JS code after finishing tests in parallel mode](https://codecept.io/bootstrap/#bootstrapall-teardownall)
|
|
231
231
|
*/
|
|
232
|
-
teardownAll?: () => Promise<void> | boolean | string;
|
|
232
|
+
teardownAll?: (() => Promise<void>) | boolean | string;
|
|
233
233
|
/** Enable [localized test commands](https://codecept.io/translation/) */
|
|
234
234
|
translation?: string;
|
|
235
235
|
/**
|
|
@@ -243,8 +243,8 @@ declare namespace CodeceptJS {
|
|
|
243
243
|
require?: Array<string>;
|
|
244
244
|
|
|
245
245
|
/**
|
|
246
|
-
* Enable [BDD features](https://codecept.io/bdd/#configuration).
|
|
247
|
-
*
|
|
246
|
+
* Enable [BDD features](https://codecept.io/bdd/#configuration).
|
|
247
|
+
*
|
|
248
248
|
* Sample configuration:
|
|
249
249
|
* ```js
|
|
250
250
|
* gherkin: {
|