codeceptjs 3.6.10 → 3.7.0-beta.10
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/README.md +89 -119
- package/bin/codecept.js +9 -2
- package/docs/webapi/clearCookie.mustache +1 -1
- package/lib/actor.js +66 -102
- package/lib/ai.js +130 -121
- package/lib/assert/empty.js +3 -5
- package/lib/assert/equal.js +4 -7
- package/lib/assert/include.js +4 -6
- package/lib/assert/throws.js +2 -4
- package/lib/assert/truth.js +2 -2
- package/lib/codecept.js +87 -83
- package/lib/command/check.js +186 -0
- package/lib/command/configMigrate.js +2 -4
- package/lib/command/definitions.js +8 -26
- package/lib/command/generate.js +10 -14
- package/lib/command/gherkin/snippets.js +10 -8
- package/lib/command/gherkin/steps.js +1 -1
- package/lib/command/info.js +1 -3
- package/lib/command/init.js +8 -12
- package/lib/command/interactive.js +2 -2
- package/lib/command/list.js +1 -1
- package/lib/command/run-multiple.js +12 -35
- package/lib/command/run-workers.js +5 -57
- package/lib/command/utils.js +5 -6
- package/lib/command/workers/runTests.js +68 -232
- package/lib/container.js +354 -237
- package/lib/data/context.js +10 -13
- package/lib/data/dataScenarioConfig.js +8 -8
- package/lib/data/dataTableArgument.js +6 -6
- package/lib/data/table.js +5 -11
- package/lib/effects.js +218 -0
- package/lib/els.js +158 -0
- package/lib/event.js +19 -17
- package/lib/heal.js +88 -80
- package/lib/helper/AI.js +2 -1
- package/lib/helper/ApiDataFactory.js +3 -6
- package/lib/helper/Appium.js +45 -51
- package/lib/helper/FileSystem.js +3 -3
- package/lib/helper/GraphQLDataFactory.js +3 -3
- package/lib/helper/JSONResponse.js +57 -37
- package/lib/helper/Nightmare.js +35 -53
- package/lib/helper/Playwright.js +211 -252
- package/lib/helper/Protractor.js +54 -77
- package/lib/helper/Puppeteer.js +139 -232
- package/lib/helper/REST.js +5 -17
- package/lib/helper/TestCafe.js +21 -44
- package/lib/helper/WebDriver.js +131 -169
- package/lib/helper/testcafe/testcafe-utils.js +26 -27
- package/lib/listener/emptyRun.js +55 -0
- package/lib/listener/exit.js +7 -10
- package/lib/listener/{retry.js → globalRetry.js} +5 -5
- package/lib/listener/globalTimeout.js +165 -0
- package/lib/listener/helpers.js +15 -15
- package/lib/listener/mocha.js +1 -1
- package/lib/listener/result.js +12 -0
- package/lib/listener/steps.js +20 -18
- package/lib/listener/store.js +20 -0
- package/lib/mocha/asyncWrapper.js +216 -0
- package/lib/{interfaces → mocha}/bdd.js +3 -3
- package/lib/mocha/cli.js +308 -0
- package/lib/mocha/factory.js +104 -0
- package/lib/{interfaces → mocha}/featureConfig.js +24 -12
- package/lib/{interfaces → mocha}/gherkin.js +26 -28
- package/lib/mocha/hooks.js +112 -0
- package/lib/mocha/index.js +12 -0
- package/lib/mocha/inject.js +29 -0
- package/lib/{interfaces → mocha}/scenarioConfig.js +21 -6
- package/lib/mocha/suite.js +81 -0
- package/lib/mocha/test.js +159 -0
- package/lib/mocha/types.d.ts +42 -0
- package/lib/mocha/ui.js +219 -0
- package/lib/output.js +82 -62
- package/lib/pause.js +155 -138
- package/lib/plugin/analyze.js +349 -0
- package/lib/plugin/autoDelay.js +6 -6
- package/lib/plugin/autoLogin.js +6 -7
- package/lib/plugin/commentStep.js +6 -1
- package/lib/plugin/coverage.js +10 -19
- package/lib/plugin/customLocator.js +3 -3
- package/lib/plugin/customReporter.js +52 -0
- package/lib/plugin/eachElement.js +1 -1
- package/lib/plugin/fakerTransform.js +1 -1
- package/lib/plugin/heal.js +36 -9
- package/lib/plugin/pageInfo.js +140 -0
- package/lib/plugin/retryFailedStep.js +4 -4
- package/lib/plugin/retryTo.js +18 -118
- package/lib/plugin/screenshotOnFail.js +17 -49
- package/lib/plugin/selenoid.js +15 -35
- package/lib/plugin/standardActingHelpers.js +4 -1
- package/lib/plugin/stepByStepReport.js +56 -17
- package/lib/plugin/stepTimeout.js +5 -12
- package/lib/plugin/subtitles.js +4 -4
- package/lib/plugin/tryTo.js +17 -107
- package/lib/plugin/wdio.js +8 -10
- package/lib/recorder.js +146 -125
- package/lib/rerun.js +43 -42
- package/lib/result.js +161 -0
- package/lib/secret.js +1 -1
- package/lib/step/base.js +228 -0
- package/lib/step/config.js +50 -0
- package/lib/step/func.js +46 -0
- package/lib/step/helper.js +50 -0
- package/lib/step/meta.js +99 -0
- package/lib/step/record.js +74 -0
- package/lib/step/retry.js +11 -0
- package/lib/step/section.js +55 -0
- package/lib/step.js +21 -332
- package/lib/steps.js +50 -0
- package/lib/store.js +10 -2
- package/lib/template/heal.js +2 -11
- package/lib/timeout.js +66 -0
- package/lib/utils.js +317 -216
- package/lib/within.js +73 -55
- package/lib/workers.js +259 -275
- package/package.json +56 -54
- package/typings/index.d.ts +175 -186
- package/typings/promiseBasedTypes.d.ts +164 -17
- package/typings/types.d.ts +284 -115
- package/lib/cli.js +0 -256
- package/lib/helper/ExpectHelper.js +0 -391
- package/lib/helper/SoftExpectHelper.js +0 -381
- package/lib/listener/artifacts.js +0 -19
- package/lib/listener/timeout.js +0 -109
- package/lib/mochaFactory.js +0 -113
- package/lib/plugin/debugErrors.js +0 -67
- package/lib/scenario.js +0 -224
- package/lib/ui.js +0 -236
package/typings/types.d.ts
CHANGED
|
@@ -608,17 +608,11 @@ declare namespace CodeceptJS {
|
|
|
608
608
|
* ```js
|
|
609
609
|
* // taps outside to hide keyboard per default
|
|
610
610
|
* I.hideDeviceKeyboard();
|
|
611
|
-
* I.hideDeviceKeyboard('tapOutside');
|
|
612
|
-
*
|
|
613
|
-
* // or by pressing key
|
|
614
|
-
* I.hideDeviceKeyboard('pressKey', 'Done');
|
|
615
611
|
* ```
|
|
616
612
|
*
|
|
617
613
|
* Appium: support Android and iOS
|
|
618
|
-
* @param [strategy] - Desired strategy to close keyboard (‘tapOutside’ or ‘pressKey’)
|
|
619
|
-
* @param [key] - Optional key
|
|
620
614
|
*/
|
|
621
|
-
hideDeviceKeyboard(
|
|
615
|
+
hideDeviceKeyboard(): void;
|
|
622
616
|
/**
|
|
623
617
|
* Send a key event to the device.
|
|
624
618
|
* List of keys: https://developer.android.com/reference/android/view/KeyEvent.html
|
|
@@ -1228,6 +1222,25 @@ declare namespace CodeceptJS {
|
|
|
1228
1222
|
*
|
|
1229
1223
|
* ## Methods
|
|
1230
1224
|
*/
|
|
1225
|
+
// @ts-ignore
|
|
1226
|
+
// @ts-ignore
|
|
1227
|
+
// @ts-ignore
|
|
1228
|
+
// @ts-ignore
|
|
1229
|
+
// @ts-ignore
|
|
1230
|
+
// @ts-ignore
|
|
1231
|
+
// @ts-ignore
|
|
1232
|
+
// @ts-ignore
|
|
1233
|
+
// @ts-ignore
|
|
1234
|
+
// @ts-ignore
|
|
1235
|
+
// @ts-ignore
|
|
1236
|
+
// @ts-ignore
|
|
1237
|
+
// @ts-ignore
|
|
1238
|
+
// @ts-ignore
|
|
1239
|
+
// @ts-ignore
|
|
1240
|
+
// @ts-ignore
|
|
1241
|
+
// @ts-ignore
|
|
1242
|
+
// @ts-ignore
|
|
1243
|
+
// @ts-ignore
|
|
1231
1244
|
class ExpectHelper {
|
|
1232
1245
|
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1233
1246
|
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
@@ -1339,6 +1352,25 @@ declare namespace CodeceptJS {
|
|
|
1339
1352
|
*
|
|
1340
1353
|
* ## Methods
|
|
1341
1354
|
*/
|
|
1355
|
+
// @ts-ignore
|
|
1356
|
+
// @ts-ignore
|
|
1357
|
+
// @ts-ignore
|
|
1358
|
+
// @ts-ignore
|
|
1359
|
+
// @ts-ignore
|
|
1360
|
+
// @ts-ignore
|
|
1361
|
+
// @ts-ignore
|
|
1362
|
+
// @ts-ignore
|
|
1363
|
+
// @ts-ignore
|
|
1364
|
+
// @ts-ignore
|
|
1365
|
+
// @ts-ignore
|
|
1366
|
+
// @ts-ignore
|
|
1367
|
+
// @ts-ignore
|
|
1368
|
+
// @ts-ignore
|
|
1369
|
+
// @ts-ignore
|
|
1370
|
+
// @ts-ignore
|
|
1371
|
+
// @ts-ignore
|
|
1372
|
+
// @ts-ignore
|
|
1373
|
+
// @ts-ignore
|
|
1342
1374
|
class ExpectHelper {
|
|
1343
1375
|
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1344
1376
|
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
@@ -1957,13 +1989,14 @@ declare namespace CodeceptJS {
|
|
|
1957
1989
|
*/
|
|
1958
1990
|
seeResponseContainsKeys(keys: any[]): void;
|
|
1959
1991
|
/**
|
|
1960
|
-
* Executes a callback function passing in `response` object and
|
|
1992
|
+
* Executes a callback function passing in `response` object and assert
|
|
1961
1993
|
* Use it to perform custom checks of response data
|
|
1962
1994
|
*
|
|
1963
1995
|
* ```js
|
|
1964
|
-
* I.seeResponseValidByCallback(({ data, status
|
|
1965
|
-
*
|
|
1966
|
-
*
|
|
1996
|
+
* I.seeResponseValidByCallback(({ data, status }) => {
|
|
1997
|
+
* assert.strictEqual(status, 200);
|
|
1998
|
+
* assert('user' in data);
|
|
1999
|
+
* assert('company' in data);
|
|
1967
2000
|
* });
|
|
1968
2001
|
* ```
|
|
1969
2002
|
*/
|
|
@@ -2013,6 +2046,25 @@ declare namespace CodeceptJS {
|
|
|
2013
2046
|
* @property [host = "0.0.0.0"] - Mock server host
|
|
2014
2047
|
* @property [httpsOpts] - key & cert values are the paths to .key and .crt files
|
|
2015
2048
|
*/
|
|
2049
|
+
// @ts-ignore
|
|
2050
|
+
// @ts-ignore
|
|
2051
|
+
// @ts-ignore
|
|
2052
|
+
// @ts-ignore
|
|
2053
|
+
// @ts-ignore
|
|
2054
|
+
// @ts-ignore
|
|
2055
|
+
// @ts-ignore
|
|
2056
|
+
// @ts-ignore
|
|
2057
|
+
// @ts-ignore
|
|
2058
|
+
// @ts-ignore
|
|
2059
|
+
// @ts-ignore
|
|
2060
|
+
// @ts-ignore
|
|
2061
|
+
// @ts-ignore
|
|
2062
|
+
// @ts-ignore
|
|
2063
|
+
// @ts-ignore
|
|
2064
|
+
// @ts-ignore
|
|
2065
|
+
// @ts-ignore
|
|
2066
|
+
// @ts-ignore
|
|
2067
|
+
// @ts-ignore
|
|
2016
2068
|
type MockServerConfig = {
|
|
2017
2069
|
port?: number;
|
|
2018
2070
|
host?: string;
|
|
@@ -2137,6 +2189,25 @@ declare namespace CodeceptJS {
|
|
|
2137
2189
|
*
|
|
2138
2190
|
* ## Methods
|
|
2139
2191
|
*/
|
|
2192
|
+
// @ts-ignore
|
|
2193
|
+
// @ts-ignore
|
|
2194
|
+
// @ts-ignore
|
|
2195
|
+
// @ts-ignore
|
|
2196
|
+
// @ts-ignore
|
|
2197
|
+
// @ts-ignore
|
|
2198
|
+
// @ts-ignore
|
|
2199
|
+
// @ts-ignore
|
|
2200
|
+
// @ts-ignore
|
|
2201
|
+
// @ts-ignore
|
|
2202
|
+
// @ts-ignore
|
|
2203
|
+
// @ts-ignore
|
|
2204
|
+
// @ts-ignore
|
|
2205
|
+
// @ts-ignore
|
|
2206
|
+
// @ts-ignore
|
|
2207
|
+
// @ts-ignore
|
|
2208
|
+
// @ts-ignore
|
|
2209
|
+
// @ts-ignore
|
|
2210
|
+
// @ts-ignore
|
|
2140
2211
|
class MockServer {
|
|
2141
2212
|
/**
|
|
2142
2213
|
* Start the mock server
|
|
@@ -2977,7 +3048,7 @@ declare namespace CodeceptJS {
|
|
|
2977
3048
|
*
|
|
2978
3049
|
* ```js
|
|
2979
3050
|
* I.clearCookie();
|
|
2980
|
-
* I.clearCookie('test');
|
|
3051
|
+
* I.clearCookie('test');
|
|
2981
3052
|
* ```
|
|
2982
3053
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
2983
3054
|
*/
|
|
@@ -3276,6 +3347,25 @@ declare namespace CodeceptJS {
|
|
|
3276
3347
|
* @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
3348
|
* @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
3349
|
*/
|
|
3350
|
+
// @ts-ignore
|
|
3351
|
+
// @ts-ignore
|
|
3352
|
+
// @ts-ignore
|
|
3353
|
+
// @ts-ignore
|
|
3354
|
+
// @ts-ignore
|
|
3355
|
+
// @ts-ignore
|
|
3356
|
+
// @ts-ignore
|
|
3357
|
+
// @ts-ignore
|
|
3358
|
+
// @ts-ignore
|
|
3359
|
+
// @ts-ignore
|
|
3360
|
+
// @ts-ignore
|
|
3361
|
+
// @ts-ignore
|
|
3362
|
+
// @ts-ignore
|
|
3363
|
+
// @ts-ignore
|
|
3364
|
+
// @ts-ignore
|
|
3365
|
+
// @ts-ignore
|
|
3366
|
+
// @ts-ignore
|
|
3367
|
+
// @ts-ignore
|
|
3368
|
+
// @ts-ignore
|
|
3279
3369
|
type PlaywrightConfig = {
|
|
3280
3370
|
url?: string;
|
|
3281
3371
|
browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
|
|
@@ -4681,7 +4771,7 @@ declare namespace CodeceptJS {
|
|
|
4681
4771
|
*
|
|
4682
4772
|
* ```js
|
|
4683
4773
|
* I.clearCookie();
|
|
4684
|
-
* I.clearCookie('test');
|
|
4774
|
+
* I.clearCookie('test');
|
|
4685
4775
|
* ```
|
|
4686
4776
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
4687
4777
|
*/
|
|
@@ -6354,7 +6444,7 @@ declare namespace CodeceptJS {
|
|
|
6354
6444
|
*
|
|
6355
6445
|
* ```js
|
|
6356
6446
|
* I.clearCookie();
|
|
6357
|
-
* I.clearCookie('test');
|
|
6447
|
+
* I.clearCookie('test');
|
|
6358
6448
|
* ```
|
|
6359
6449
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
6360
6450
|
*/
|
|
@@ -6803,6 +6893,25 @@ declare namespace CodeceptJS {
|
|
|
6803
6893
|
* @property [chrome] - pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
|
|
6804
6894
|
* @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
|
|
6805
6895
|
*/
|
|
6896
|
+
// @ts-ignore
|
|
6897
|
+
// @ts-ignore
|
|
6898
|
+
// @ts-ignore
|
|
6899
|
+
// @ts-ignore
|
|
6900
|
+
// @ts-ignore
|
|
6901
|
+
// @ts-ignore
|
|
6902
|
+
// @ts-ignore
|
|
6903
|
+
// @ts-ignore
|
|
6904
|
+
// @ts-ignore
|
|
6905
|
+
// @ts-ignore
|
|
6906
|
+
// @ts-ignore
|
|
6907
|
+
// @ts-ignore
|
|
6908
|
+
// @ts-ignore
|
|
6909
|
+
// @ts-ignore
|
|
6910
|
+
// @ts-ignore
|
|
6911
|
+
// @ts-ignore
|
|
6912
|
+
// @ts-ignore
|
|
6913
|
+
// @ts-ignore
|
|
6914
|
+
// @ts-ignore
|
|
6806
6915
|
type PuppeteerConfig = {
|
|
6807
6916
|
url: string;
|
|
6808
6917
|
basicAuth?: any;
|
|
@@ -8051,7 +8160,7 @@ declare namespace CodeceptJS {
|
|
|
8051
8160
|
*
|
|
8052
8161
|
* ```js
|
|
8053
8162
|
* I.clearCookie();
|
|
8054
|
-
* I.clearCookie('test');
|
|
8163
|
+
* I.clearCookie('test');
|
|
8055
8164
|
* ```
|
|
8056
8165
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
8057
8166
|
*/
|
|
@@ -8745,6 +8854,25 @@ declare namespace CodeceptJS {
|
|
|
8745
8854
|
* @property [onResponse] - an async function which can update response object.
|
|
8746
8855
|
* @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
|
|
8747
8856
|
*/
|
|
8857
|
+
// @ts-ignore
|
|
8858
|
+
// @ts-ignore
|
|
8859
|
+
// @ts-ignore
|
|
8860
|
+
// @ts-ignore
|
|
8861
|
+
// @ts-ignore
|
|
8862
|
+
// @ts-ignore
|
|
8863
|
+
// @ts-ignore
|
|
8864
|
+
// @ts-ignore
|
|
8865
|
+
// @ts-ignore
|
|
8866
|
+
// @ts-ignore
|
|
8867
|
+
// @ts-ignore
|
|
8868
|
+
// @ts-ignore
|
|
8869
|
+
// @ts-ignore
|
|
8870
|
+
// @ts-ignore
|
|
8871
|
+
// @ts-ignore
|
|
8872
|
+
// @ts-ignore
|
|
8873
|
+
// @ts-ignore
|
|
8874
|
+
// @ts-ignore
|
|
8875
|
+
// @ts-ignore
|
|
8748
8876
|
type RESTConfig = {
|
|
8749
8877
|
endpoint?: string;
|
|
8750
8878
|
prettyPrintJson?: boolean;
|
|
@@ -10055,7 +10183,7 @@ declare namespace CodeceptJS {
|
|
|
10055
10183
|
*
|
|
10056
10184
|
* ```js
|
|
10057
10185
|
* I.clearCookie();
|
|
10058
|
-
* I.clearCookie('test');
|
|
10186
|
+
* I.clearCookie('test');
|
|
10059
10187
|
* ```
|
|
10060
10188
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
10061
10189
|
*/
|
|
@@ -10193,6 +10321,25 @@ declare namespace CodeceptJS {
|
|
|
10193
10321
|
* @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
|
|
10194
10322
|
* @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
10323
|
*/
|
|
10324
|
+
// @ts-ignore
|
|
10325
|
+
// @ts-ignore
|
|
10326
|
+
// @ts-ignore
|
|
10327
|
+
// @ts-ignore
|
|
10328
|
+
// @ts-ignore
|
|
10329
|
+
// @ts-ignore
|
|
10330
|
+
// @ts-ignore
|
|
10331
|
+
// @ts-ignore
|
|
10332
|
+
// @ts-ignore
|
|
10333
|
+
// @ts-ignore
|
|
10334
|
+
// @ts-ignore
|
|
10335
|
+
// @ts-ignore
|
|
10336
|
+
// @ts-ignore
|
|
10337
|
+
// @ts-ignore
|
|
10338
|
+
// @ts-ignore
|
|
10339
|
+
// @ts-ignore
|
|
10340
|
+
// @ts-ignore
|
|
10341
|
+
// @ts-ignore
|
|
10342
|
+
// @ts-ignore
|
|
10196
10343
|
type WebDriverConfig = {
|
|
10197
10344
|
url: string;
|
|
10198
10345
|
browser: string;
|
|
@@ -11540,7 +11687,7 @@ declare namespace CodeceptJS {
|
|
|
11540
11687
|
*
|
|
11541
11688
|
* ```js
|
|
11542
11689
|
* I.clearCookie();
|
|
11543
|
-
* I.clearCookie('test');
|
|
11690
|
+
* I.clearCookie('test');
|
|
11544
11691
|
* ```
|
|
11545
11692
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
11546
11693
|
*/
|
|
@@ -12295,6 +12442,7 @@ declare namespace CodeceptJS {
|
|
|
12295
12442
|
}, newPlugins: {
|
|
12296
12443
|
[key: string]: any;
|
|
12297
12444
|
}): void;
|
|
12445
|
+
static started(fn: (...params: any[]) => any): Promise<void>;
|
|
12298
12446
|
/**
|
|
12299
12447
|
* Share data across worker threads
|
|
12300
12448
|
* @param options - set {local: true} to not share among workers
|
|
@@ -12304,7 +12452,7 @@ declare namespace CodeceptJS {
|
|
|
12304
12452
|
/**
|
|
12305
12453
|
* Method collect own property and prototype
|
|
12306
12454
|
*/
|
|
12307
|
-
function
|
|
12455
|
+
function loadTranslation(): void;
|
|
12308
12456
|
/**
|
|
12309
12457
|
* Datatable class to provide data driven testing
|
|
12310
12458
|
*/
|
|
@@ -12418,76 +12566,6 @@ declare namespace CodeceptJS {
|
|
|
12418
12566
|
var store: typeof CodeceptJS.store;
|
|
12419
12567
|
var locator: typeof CodeceptJS.Locator;
|
|
12420
12568
|
}
|
|
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
12569
|
class Locator {
|
|
12492
12570
|
constructor(locator: CodeceptJS.LocatorOrString, defaultType?: string);
|
|
12493
12571
|
toString(): string;
|
|
@@ -12697,24 +12775,49 @@ declare namespace CodeceptJS {
|
|
|
12697
12775
|
function session(sessionName: CodeceptJS.LocatorOrString, config: ((...params: any[]) => any) | {
|
|
12698
12776
|
[key: string]: any;
|
|
12699
12777
|
}, fn?: (...params: any[]) => any): any;
|
|
12778
|
+
/**
|
|
12779
|
+
* StepConfig is a configuration object for a step.
|
|
12780
|
+
* It is used to create a new step that is a combination of other steps.
|
|
12781
|
+
*/
|
|
12782
|
+
class StepConfig {
|
|
12783
|
+
config: any;
|
|
12784
|
+
/**
|
|
12785
|
+
* Set the options for the step.
|
|
12786
|
+
* @param opts - The options for the step.
|
|
12787
|
+
* @returns - The step configuration object.
|
|
12788
|
+
*/
|
|
12789
|
+
opts(opts: any): StepConfig;
|
|
12790
|
+
/**
|
|
12791
|
+
* Set the timeout for the step.
|
|
12792
|
+
* @param timeout - The timeout for the step.
|
|
12793
|
+
* @returns - The step configuration object.
|
|
12794
|
+
*/
|
|
12795
|
+
timeout(timeout: number): StepConfig;
|
|
12796
|
+
/**
|
|
12797
|
+
* Set the retry for the step.
|
|
12798
|
+
* @param retry - The retry for the step.
|
|
12799
|
+
* @returns - The step configuration object.
|
|
12800
|
+
*/
|
|
12801
|
+
retry(retry: number): StepConfig;
|
|
12802
|
+
}
|
|
12700
12803
|
/**
|
|
12701
12804
|
* Each command in test executed through `I.` object is wrapped in Step.
|
|
12702
12805
|
* Step allows logging executed commands and triggers hook before and after step execution.
|
|
12703
12806
|
*/
|
|
12704
12807
|
class Step {
|
|
12705
|
-
constructor(
|
|
12706
|
-
actor: string;
|
|
12707
|
-
helper: CodeceptJS.Helper;
|
|
12808
|
+
constructor(name: string);
|
|
12708
12809
|
name: string;
|
|
12810
|
+
timeouts: Map<number, number>;
|
|
12811
|
+
args: any[];
|
|
12812
|
+
opts: Record<string, any>;
|
|
12813
|
+
actor: string;
|
|
12709
12814
|
helperMethod: string;
|
|
12710
12815
|
status: string;
|
|
12711
|
-
suffix: string;
|
|
12712
12816
|
prefix: string;
|
|
12713
12817
|
comment: string;
|
|
12714
|
-
|
|
12715
|
-
metaStep: MetaStep;
|
|
12818
|
+
metaStep: any;
|
|
12716
12819
|
stack: string;
|
|
12717
|
-
|
|
12820
|
+
timeout: any;
|
|
12718
12821
|
/**
|
|
12719
12822
|
* @param timeout - timeout in milliseconds or 0 if no timeout
|
|
12720
12823
|
* @param order - order defines the priority of timeout, timeouts set with lower order override those set with higher order.
|
|
@@ -12723,19 +12826,14 @@ declare namespace CodeceptJS {
|
|
|
12723
12826
|
setTimeout(timeout: number, order: number): void;
|
|
12724
12827
|
setTrace(): void;
|
|
12725
12828
|
setArguments(args: any[]): void;
|
|
12726
|
-
run(...args: any[]): any;
|
|
12727
12829
|
setStatus(status: string): void;
|
|
12728
12830
|
humanize(): string;
|
|
12729
12831
|
humanizeArgs(): string;
|
|
12730
12832
|
line(): string;
|
|
12731
12833
|
toString(): string;
|
|
12834
|
+
toCliStyled(): string;
|
|
12732
12835
|
toCode(): string;
|
|
12733
12836
|
hasBDDAncestor(): boolean;
|
|
12734
|
-
static MetaStep: typeof MetaStep;
|
|
12735
|
-
}
|
|
12736
|
-
class MetaStep extends Step {
|
|
12737
|
-
isBDD(): boolean;
|
|
12738
|
-
run(): any;
|
|
12739
12837
|
}
|
|
12740
12838
|
/**
|
|
12741
12839
|
* global values for current session
|
|
@@ -12744,6 +12842,9 @@ declare namespace CodeceptJS {
|
|
|
12744
12842
|
var debugMode: boolean;
|
|
12745
12843
|
var timeouts: boolean;
|
|
12746
12844
|
var dryRun: boolean;
|
|
12845
|
+
var onPause: boolean;
|
|
12846
|
+
var currentTest: CodeceptJS.Test | null;
|
|
12847
|
+
var currentStep: any;
|
|
12747
12848
|
}
|
|
12748
12849
|
/**
|
|
12749
12850
|
* Describe a "suite" with the given `title`
|
|
@@ -12765,6 +12866,84 @@ declare namespace CodeceptJS {
|
|
|
12765
12866
|
* Pending test case with message: 'Test not implemented!'.
|
|
12766
12867
|
*/
|
|
12767
12868
|
const todo: CodeceptJS.IScenario;
|
|
12869
|
+
/**
|
|
12870
|
+
* Configuration for a Feature.
|
|
12871
|
+
* Can inject values and add custom configuration.
|
|
12872
|
+
*/
|
|
12873
|
+
class FeatureConfig {
|
|
12874
|
+
/**
|
|
12875
|
+
* Set metadata for this suite
|
|
12876
|
+
*/
|
|
12877
|
+
meta(key: string, value: string): this;
|
|
12878
|
+
/**
|
|
12879
|
+
* Retry this test for number of times
|
|
12880
|
+
*/
|
|
12881
|
+
retry(retries: number): this;
|
|
12882
|
+
/**
|
|
12883
|
+
* Set timeout for this test
|
|
12884
|
+
*/
|
|
12885
|
+
timeout(timeout: number): this;
|
|
12886
|
+
/**
|
|
12887
|
+
* Configures a helper.
|
|
12888
|
+
* Helper name can be omitted and values will be applied to first helper.
|
|
12889
|
+
*/
|
|
12890
|
+
config(helper: string | number, obj: any): this;
|
|
12891
|
+
/**
|
|
12892
|
+
* Append a tag name to scenario title
|
|
12893
|
+
*/
|
|
12894
|
+
tag(tagName: string): this;
|
|
12895
|
+
}
|
|
12896
|
+
class ScenarioConfig {
|
|
12897
|
+
/**
|
|
12898
|
+
* Declares that test throws error.
|
|
12899
|
+
* Can pass an Error object or regex matching expected message.
|
|
12900
|
+
*/
|
|
12901
|
+
throws(err: any): this;
|
|
12902
|
+
/**
|
|
12903
|
+
* Declares that test should fail.
|
|
12904
|
+
* If test passes - throws an error.
|
|
12905
|
+
* Can pass an Error object or regex matching expected message.
|
|
12906
|
+
*/
|
|
12907
|
+
fails(): this;
|
|
12908
|
+
/**
|
|
12909
|
+
* Retry this test for x times
|
|
12910
|
+
*/
|
|
12911
|
+
retry(retries: number): this;
|
|
12912
|
+
/**
|
|
12913
|
+
* Set metadata for this test
|
|
12914
|
+
*/
|
|
12915
|
+
meta(key: string, value: string): this;
|
|
12916
|
+
/**
|
|
12917
|
+
* Set timeout for this test
|
|
12918
|
+
*/
|
|
12919
|
+
timeout(timeout: number): this;
|
|
12920
|
+
/**
|
|
12921
|
+
* Pass in additional objects to inject into test
|
|
12922
|
+
*/
|
|
12923
|
+
inject(obj: {
|
|
12924
|
+
[key: string]: any;
|
|
12925
|
+
}): this;
|
|
12926
|
+
/**
|
|
12927
|
+
* Configures a helper.
|
|
12928
|
+
* Helper name can be omitted and values will be applied to first helper.
|
|
12929
|
+
*/
|
|
12930
|
+
config(helper: string | {
|
|
12931
|
+
[key: string]: any;
|
|
12932
|
+
}, obj?: {
|
|
12933
|
+
[key: string]: any;
|
|
12934
|
+
}): this;
|
|
12935
|
+
/**
|
|
12936
|
+
* Append a tag name to scenario title
|
|
12937
|
+
*/
|
|
12938
|
+
tag(tagName: string): this;
|
|
12939
|
+
/**
|
|
12940
|
+
* Dynamically injects dependencies, see https://codecept.io/pageobjects/#dynamic-injection
|
|
12941
|
+
*/
|
|
12942
|
+
injectDependencies(dependencies: {
|
|
12943
|
+
[key: string]: any;
|
|
12944
|
+
}): this;
|
|
12945
|
+
}
|
|
12946
|
+
function addStep(step: any, fn: any): void;
|
|
12768
12947
|
function within(context: CodeceptJS.LocatorOrString, fn: (...params: any[]) => any): Promise<any> | undefined;
|
|
12769
12948
|
/**
|
|
12770
12949
|
* This is a wrapper on top of [Detox](https://github.com/wix/Detox) library, aimied to unify testing experience for CodeceptJS framework.
|
|
@@ -13366,22 +13545,12 @@ declare namespace CodeceptJS {
|
|
|
13366
13545
|
}
|
|
13367
13546
|
|
|
13368
13547
|
/**
|
|
13369
|
-
*
|
|
13370
|
-
*/
|
|
13371
|
-
declare var testOrSuite: any;
|
|
13372
|
-
|
|
13373
|
-
/**
|
|
13374
|
-
* 0-9 - designated for override of timeouts set from code, 5 is used by stepTimeout plugin when stepTimeout.config.overrideStepLimits=true
|
|
13375
|
-
*/
|
|
13376
|
-
declare var stepTimeoutHard: any;
|
|
13377
|
-
|
|
13378
|
-
/**
|
|
13379
|
-
* 10-19 - designated for timeouts set from code, 15 is order of I.setTimeout(t) operation
|
|
13548
|
+
* corresponding helper
|
|
13380
13549
|
*/
|
|
13381
|
-
declare var
|
|
13550
|
+
declare var helper: CodeceptJS.Helper;
|
|
13382
13551
|
|
|
13383
13552
|
/**
|
|
13384
|
-
*
|
|
13553
|
+
* name of method to be executed
|
|
13385
13554
|
*/
|
|
13386
|
-
declare var
|
|
13555
|
+
declare var helperMethod: string;
|
|
13387
13556
|
|