codeceptjs 3.7.0-beta.6 → 3.7.0-beta.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/README.md +7 -7
- package/lib/helper/Appium.js +4 -6
- package/lib/helper/WebDriver.js +20 -7
- package/lib/pause.js +0 -3
- package/package.json +12 -12
- package/typings/promiseBasedTypes.d.ts +0 -8
- package/typings/types.d.ts +46 -50
package/README.md
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
## Build Status
|
|
7
7
|
|
|
8
|
-
| Type | Engine | Status
|
|
9
|
-
| --------- | ---------- |
|
|
10
|
-
| 🌐 Web | Playwright | [](https://github.com/codeceptjs/CodeceptJS/actions/workflows/playwright.yml)
|
|
11
|
-
| 🌐 Web | Puppeteer | [](https://github.com/codeceptjs/CodeceptJS/actions/workflows/puppeteer.yml)
|
|
12
|
-
| 🌐 Web | WebDriver | [](https://github.com/codeceptjs/CodeceptJS/actions/workflows/webdriver.yml)
|
|
13
|
-
| 🌐 Web | TestCafe | [](https://github.com/codeceptjs/CodeceptJS/actions/workflows/testcafe.yml)
|
|
14
|
-
| 📱 Mobile | Appium | [](https://github.com/codeceptjs/CodeceptJS/actions/workflows/playwright.yml) |
|
|
11
|
+
| 🌐 Web | Puppeteer | [](https://github.com/codeceptjs/CodeceptJS/actions/workflows/puppeteer.yml) |
|
|
12
|
+
| 🌐 Web | WebDriver | [](https://github.com/codeceptjs/CodeceptJS/actions/workflows/webdriver.yml) |
|
|
13
|
+
| 🌐 Web | TestCafe | [](https://github.com/codeceptjs/CodeceptJS/actions/workflows/testcafe.yml) |
|
|
14
|
+
| 📱 Mobile | Appium | [](https://github.com/codeceptjs/CodeceptJS/actions/workflows/appium_Android.yml) |
|
|
15
15
|
|
|
16
16
|
# CodeceptJS [](https://stand-with-ukraine.pp.ua)
|
|
17
17
|
|
package/lib/helper/Appium.js
CHANGED
|
@@ -44,7 +44,7 @@ const vendorPrefix = {
|
|
|
44
44
|
*
|
|
45
45
|
* This helper should be configured in codecept.conf.ts or codecept.conf.js
|
|
46
46
|
*
|
|
47
|
-
* * `appiumV2`: set this to
|
|
47
|
+
* * `appiumV2`: by default is true, set this to false if you want to run tests with AppiumV1. See more how to setup [here](https://codecept.io/mobile/#setting-up)
|
|
48
48
|
* * `app`: Application path. Local path or remote URL to an .ipa or .apk file, or a .zip containing one of these. Alias to desiredCapabilities.appPackage
|
|
49
49
|
* * `host`: (default: 'localhost') Appium host
|
|
50
50
|
* * `port`: (default: '4723') Appium port
|
|
@@ -124,7 +124,7 @@ const vendorPrefix = {
|
|
|
124
124
|
* {
|
|
125
125
|
* helpers: {
|
|
126
126
|
* Appium: {
|
|
127
|
-
* appiumV2: true,
|
|
127
|
+
* appiumV2: true, // By default is true, set to false if you want to run against Appium v1
|
|
128
128
|
* host: "hub-cloud.browserstack.com",
|
|
129
129
|
* port: 4444,
|
|
130
130
|
* user: process.env.BROWSERSTACK_USER,
|
|
@@ -178,14 +178,12 @@ class Appium extends Webdriver {
|
|
|
178
178
|
super(config)
|
|
179
179
|
|
|
180
180
|
this.isRunning = false
|
|
181
|
-
|
|
182
|
-
this.appiumV2 = true
|
|
183
|
-
}
|
|
181
|
+
this.appiumV2 = config.appiumV2 || true
|
|
184
182
|
this.axios = axios.create()
|
|
185
183
|
|
|
186
184
|
webdriverio = require('webdriverio')
|
|
187
185
|
if (!config.appiumV2) {
|
|
188
|
-
console.log('The Appium core team does not maintain Appium 1.x anymore since the 1st of January 2022.
|
|
186
|
+
console.log('The Appium core team does not maintain Appium 1.x anymore since the 1st of January 2022. Appium 2.x is used by default.')
|
|
189
187
|
console.log('More info: https://bit.ly/appium-v2-migration')
|
|
190
188
|
console.log('This Appium 1.x support will be removed in next major release.')
|
|
191
189
|
}
|
package/lib/helper/WebDriver.js
CHANGED
|
@@ -24,6 +24,7 @@ const { dontSeeTraffic, seeTraffic, grabRecordedNetworkTraffics, stopRecordingTr
|
|
|
24
24
|
|
|
25
25
|
const SHADOW = 'shadow'
|
|
26
26
|
const webRoot = 'body'
|
|
27
|
+
let browserLogs = []
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* ## Configuration
|
|
@@ -621,6 +622,10 @@ class WebDriver extends Helper {
|
|
|
621
622
|
}
|
|
622
623
|
|
|
623
624
|
this.browser.on('dialog', () => {})
|
|
625
|
+
|
|
626
|
+
await this.browser.sessionSubscribe({ events: ['log.entryAdded'] })
|
|
627
|
+
this.browser.on('log.entryAdded', logEvents)
|
|
628
|
+
|
|
624
629
|
return this.browser
|
|
625
630
|
}
|
|
626
631
|
|
|
@@ -658,6 +663,7 @@ class WebDriver extends Helper {
|
|
|
658
663
|
if (!(err.message.indexOf("Storage is disabled inside 'data:' URLs.") > -1)) throw err
|
|
659
664
|
})
|
|
660
665
|
await this.closeOtherTabs()
|
|
666
|
+
browserLogs = []
|
|
661
667
|
return this.browser
|
|
662
668
|
}
|
|
663
669
|
|
|
@@ -1522,11 +1528,7 @@ class WebDriver extends Helper {
|
|
|
1522
1528
|
* {{> grabBrowserLogs }}
|
|
1523
1529
|
*/
|
|
1524
1530
|
async grabBrowserLogs() {
|
|
1525
|
-
|
|
1526
|
-
this.debug('Logs not available in W3C specification')
|
|
1527
|
-
return
|
|
1528
|
-
}
|
|
1529
|
-
return this.browser.getLogs('browser')
|
|
1531
|
+
return browserLogs
|
|
1530
1532
|
}
|
|
1531
1533
|
|
|
1532
1534
|
/**
|
|
@@ -1788,18 +1790,25 @@ class WebDriver extends Helper {
|
|
|
1788
1790
|
|
|
1789
1791
|
if (browser) {
|
|
1790
1792
|
this.debug(`Screenshot of ${sessionName} session has been saved to ${outputFile}`)
|
|
1791
|
-
|
|
1793
|
+
await browser.saveScreenshot(outputFile)
|
|
1792
1794
|
}
|
|
1793
1795
|
}
|
|
1794
1796
|
}
|
|
1795
1797
|
|
|
1796
1798
|
if (!fullPage) {
|
|
1797
1799
|
this.debug(`Screenshot has been saved to ${outputFile}`)
|
|
1798
|
-
|
|
1800
|
+
await this.browser.saveScreenshot(outputFile)
|
|
1799
1801
|
}
|
|
1800
1802
|
|
|
1801
1803
|
const originalWindowSize = await this.browser.getWindowSize()
|
|
1802
1804
|
|
|
1805
|
+
// this case running on device, so we could not set the windowSize
|
|
1806
|
+
if (this.browser.isMobile) {
|
|
1807
|
+
this.debug(`Screenshot has been saved to ${outputFile}, size: ${originalWindowSize.width}x${originalWindowSize.height}`)
|
|
1808
|
+
const buffer = await this.browser.saveScreenshot(outputFile)
|
|
1809
|
+
return buffer
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1803
1812
|
let { width, height } = await this.browser
|
|
1804
1813
|
.execute(function () {
|
|
1805
1814
|
return {
|
|
@@ -3134,4 +3143,8 @@ function prepareLocateFn(context) {
|
|
|
3134
3143
|
}
|
|
3135
3144
|
}
|
|
3136
3145
|
|
|
3146
|
+
function logEvents(event) {
|
|
3147
|
+
browserLogs.push(event.text) // add log message to the array
|
|
3148
|
+
}
|
|
3149
|
+
|
|
3137
3150
|
module.exports = WebDriver
|
package/lib/pause.js
CHANGED
|
@@ -84,12 +84,10 @@ function pauseSession(passedObject = {}) {
|
|
|
84
84
|
})
|
|
85
85
|
return new Promise(resolve => {
|
|
86
86
|
finish = resolve
|
|
87
|
-
// eslint-disable-next-line
|
|
88
87
|
return askForStep()
|
|
89
88
|
})
|
|
90
89
|
}
|
|
91
90
|
|
|
92
|
-
/* eslint-disable */
|
|
93
91
|
async function parseInput(cmd) {
|
|
94
92
|
rl.pause()
|
|
95
93
|
next = false
|
|
@@ -198,7 +196,6 @@ async function parseInput(cmd) {
|
|
|
198
196
|
recorder.add('ask for next step', askForStep)
|
|
199
197
|
nextStep()
|
|
200
198
|
}
|
|
201
|
-
/* eslint-enable */
|
|
202
199
|
|
|
203
200
|
function askForStep() {
|
|
204
201
|
return new Promise(resolve => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeceptjs",
|
|
3
|
-
"version": "3.7.0-beta.
|
|
3
|
+
"version": "3.7.0-beta.7",
|
|
4
4
|
"description": "Supercharged End 2 End Testing Framework for NodeJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"acceptance",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"test:unit": "mocha test/unit --recursive --timeout 10000",
|
|
51
51
|
"test:runner": "mocha test/runner --recursive --timeout 10000",
|
|
52
52
|
"test": "npm run test:unit && npm run test:runner",
|
|
53
|
-
"test:appium-quick": "mocha test/helper/
|
|
54
|
-
"test:appium-other": "mocha test/helper/
|
|
55
|
-
"test:ios:appium-quick": "mocha test/helper/
|
|
56
|
-
"test:ios:appium-other": "mocha test/helper/
|
|
53
|
+
"test:appium-quick": "mocha test/helper/Appium_test.js --grep 'quick'",
|
|
54
|
+
"test:appium-other": "mocha test/helper/Appium_test.js --grep 'second'",
|
|
55
|
+
"test:ios:appium-quick": "mocha test/helper/Appium_ios_test.js --grep 'quick'",
|
|
56
|
+
"test:ios:appium-other": "mocha test/helper/Appium_ios_test.js --grep 'second'",
|
|
57
57
|
"test-app:start": "php -S 127.0.0.1:8000 -t test/data/app",
|
|
58
58
|
"test-app:stop": "kill -9 $(lsof -t -i:8000)",
|
|
59
59
|
"test:unit:webbapi:playwright": "mocha test/helper/Playwright_test.js",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"figures": "3.2.0",
|
|
95
95
|
"fn-args": "4.0.0",
|
|
96
96
|
"fs-extra": "11.2.0",
|
|
97
|
-
"glob": "
|
|
97
|
+
"glob": ">=9.0.0",
|
|
98
98
|
"fuse.js": "^7.0.0",
|
|
99
99
|
"html-minifier-terser": "7.2.0",
|
|
100
100
|
"inquirer": "6.5.2",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"promise-retry": "1.1.1",
|
|
114
114
|
"resq": "1.11.0",
|
|
115
115
|
"sprintf-js": "1.1.3",
|
|
116
|
-
"uuid": "11.0.
|
|
116
|
+
"uuid": "11.0.5"
|
|
117
117
|
},
|
|
118
118
|
"optionalDependencies": {
|
|
119
119
|
"@codeceptjs/detox-helper": "1.1.5"
|
|
@@ -124,13 +124,13 @@
|
|
|
124
124
|
"@codeceptjs/mock-request": "0.3.1",
|
|
125
125
|
"@eslint/eslintrc": "3.2.0",
|
|
126
126
|
"@eslint/js": "9.18.0",
|
|
127
|
-
"@faker-js/faker": "9.
|
|
127
|
+
"@faker-js/faker": "9.4.0",
|
|
128
128
|
"@pollyjs/adapter-puppeteer": "6.0.6",
|
|
129
129
|
"@pollyjs/core": "5.1.0",
|
|
130
130
|
"@types/chai": "4.3.19",
|
|
131
131
|
"@types/inquirer": "9.0.7",
|
|
132
|
-
"@types/node": "22.10.
|
|
133
|
-
"@wdio/sauce-service": "9.5.
|
|
132
|
+
"@types/node": "22.10.7",
|
|
133
|
+
"@wdio/sauce-service": "9.5.7",
|
|
134
134
|
"@wdio/selenium-standalone-service": "8.15.0",
|
|
135
135
|
"@wdio/utils": "9.5.0",
|
|
136
136
|
"@xmldom/xmldom": "0.9.6",
|
|
@@ -138,8 +138,8 @@
|
|
|
138
138
|
"chai-as-promised": "7.1.2",
|
|
139
139
|
"chai-subset": "1.6.0",
|
|
140
140
|
"documentation": "14.0.3",
|
|
141
|
-
"electron": "
|
|
142
|
-
"eslint": "^9.
|
|
141
|
+
"electron": "34.0.0",
|
|
142
|
+
"eslint": "^9.18.0",
|
|
143
143
|
"eslint-plugin-import": "2.31.0",
|
|
144
144
|
"eslint-plugin-mocha": "10.5.0",
|
|
145
145
|
"expect": "29.7.0",
|
|
@@ -1204,7 +1204,6 @@ declare namespace CodeceptJS {
|
|
|
1204
1204
|
// @ts-ignore
|
|
1205
1205
|
// @ts-ignore
|
|
1206
1206
|
// @ts-ignore
|
|
1207
|
-
// @ts-ignore
|
|
1208
1207
|
class ExpectHelper {
|
|
1209
1208
|
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1210
1209
|
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
@@ -1322,7 +1321,6 @@ declare namespace CodeceptJS {
|
|
|
1322
1321
|
// @ts-ignore
|
|
1323
1322
|
// @ts-ignore
|
|
1324
1323
|
// @ts-ignore
|
|
1325
|
-
// @ts-ignore
|
|
1326
1324
|
class ExpectHelper {
|
|
1327
1325
|
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1328
1326
|
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
@@ -2001,7 +1999,6 @@ declare namespace CodeceptJS {
|
|
|
2001
1999
|
// @ts-ignore
|
|
2002
2000
|
// @ts-ignore
|
|
2003
2001
|
// @ts-ignore
|
|
2004
|
-
// @ts-ignore
|
|
2005
2002
|
type MockServerConfig = {
|
|
2006
2003
|
port?: number;
|
|
2007
2004
|
host?: string;
|
|
@@ -2132,7 +2129,6 @@ declare namespace CodeceptJS {
|
|
|
2132
2129
|
// @ts-ignore
|
|
2133
2130
|
// @ts-ignore
|
|
2134
2131
|
// @ts-ignore
|
|
2135
|
-
// @ts-ignore
|
|
2136
2132
|
class MockServer {
|
|
2137
2133
|
/**
|
|
2138
2134
|
* Start the mock server
|
|
@@ -3212,7 +3208,6 @@ declare namespace CodeceptJS {
|
|
|
3212
3208
|
// @ts-ignore
|
|
3213
3209
|
// @ts-ignore
|
|
3214
3210
|
// @ts-ignore
|
|
3215
|
-
// @ts-ignore
|
|
3216
3211
|
type PlaywrightConfig = {
|
|
3217
3212
|
url?: string;
|
|
3218
3213
|
browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
|
|
@@ -6595,7 +6590,6 @@ declare namespace CodeceptJS {
|
|
|
6595
6590
|
// @ts-ignore
|
|
6596
6591
|
// @ts-ignore
|
|
6597
6592
|
// @ts-ignore
|
|
6598
|
-
// @ts-ignore
|
|
6599
6593
|
type PuppeteerConfig = {
|
|
6600
6594
|
url: string;
|
|
6601
6595
|
basicAuth?: any;
|
|
@@ -8408,7 +8402,6 @@ declare namespace CodeceptJS {
|
|
|
8408
8402
|
// @ts-ignore
|
|
8409
8403
|
// @ts-ignore
|
|
8410
8404
|
// @ts-ignore
|
|
8411
|
-
// @ts-ignore
|
|
8412
8405
|
type RESTConfig = {
|
|
8413
8406
|
endpoint?: string;
|
|
8414
8407
|
prettyPrintJson?: boolean;
|
|
@@ -9803,7 +9796,6 @@ declare namespace CodeceptJS {
|
|
|
9803
9796
|
// @ts-ignore
|
|
9804
9797
|
// @ts-ignore
|
|
9805
9798
|
// @ts-ignore
|
|
9806
|
-
// @ts-ignore
|
|
9807
9799
|
type WebDriverConfig = {
|
|
9808
9800
|
url: string;
|
|
9809
9801
|
browser: string;
|
package/typings/types.d.ts
CHANGED
|
@@ -1228,7 +1228,6 @@ declare namespace CodeceptJS {
|
|
|
1228
1228
|
// @ts-ignore
|
|
1229
1229
|
// @ts-ignore
|
|
1230
1230
|
// @ts-ignore
|
|
1231
|
-
// @ts-ignore
|
|
1232
1231
|
class ExpectHelper {
|
|
1233
1232
|
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1234
1233
|
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
@@ -1346,7 +1345,6 @@ declare namespace CodeceptJS {
|
|
|
1346
1345
|
// @ts-ignore
|
|
1347
1346
|
// @ts-ignore
|
|
1348
1347
|
// @ts-ignore
|
|
1349
|
-
// @ts-ignore
|
|
1350
1348
|
class ExpectHelper {
|
|
1351
1349
|
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1352
1350
|
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
@@ -2028,7 +2026,6 @@ declare namespace CodeceptJS {
|
|
|
2028
2026
|
// @ts-ignore
|
|
2029
2027
|
// @ts-ignore
|
|
2030
2028
|
// @ts-ignore
|
|
2031
|
-
// @ts-ignore
|
|
2032
2029
|
type MockServerConfig = {
|
|
2033
2030
|
port?: number;
|
|
2034
2031
|
host?: string;
|
|
@@ -2159,7 +2156,6 @@ declare namespace CodeceptJS {
|
|
|
2159
2156
|
// @ts-ignore
|
|
2160
2157
|
// @ts-ignore
|
|
2161
2158
|
// @ts-ignore
|
|
2162
|
-
// @ts-ignore
|
|
2163
2159
|
class MockServer {
|
|
2164
2160
|
/**
|
|
2165
2161
|
* Start the mock server
|
|
@@ -3305,7 +3301,6 @@ declare namespace CodeceptJS {
|
|
|
3305
3301
|
// @ts-ignore
|
|
3306
3302
|
// @ts-ignore
|
|
3307
3303
|
// @ts-ignore
|
|
3308
|
-
// @ts-ignore
|
|
3309
3304
|
type PlaywrightConfig = {
|
|
3310
3305
|
url?: string;
|
|
3311
3306
|
browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
|
|
@@ -6839,7 +6834,6 @@ declare namespace CodeceptJS {
|
|
|
6839
6834
|
// @ts-ignore
|
|
6840
6835
|
// @ts-ignore
|
|
6841
6836
|
// @ts-ignore
|
|
6842
|
-
// @ts-ignore
|
|
6843
6837
|
type PuppeteerConfig = {
|
|
6844
6838
|
url: string;
|
|
6845
6839
|
basicAuth?: any;
|
|
@@ -8788,7 +8782,6 @@ declare namespace CodeceptJS {
|
|
|
8788
8782
|
// @ts-ignore
|
|
8789
8783
|
// @ts-ignore
|
|
8790
8784
|
// @ts-ignore
|
|
8791
|
-
// @ts-ignore
|
|
8792
8785
|
type RESTConfig = {
|
|
8793
8786
|
endpoint?: string;
|
|
8794
8787
|
prettyPrintJson?: boolean;
|
|
@@ -10243,7 +10236,6 @@ declare namespace CodeceptJS {
|
|
|
10243
10236
|
// @ts-ignore
|
|
10244
10237
|
// @ts-ignore
|
|
10245
10238
|
// @ts-ignore
|
|
10246
|
-
// @ts-ignore
|
|
10247
10239
|
type WebDriverConfig = {
|
|
10248
10240
|
url: string;
|
|
10249
10241
|
browser: string;
|
|
@@ -12346,7 +12338,7 @@ declare namespace CodeceptJS {
|
|
|
12346
12338
|
}, newPlugins: {
|
|
12347
12339
|
[key: string]: any;
|
|
12348
12340
|
}): void;
|
|
12349
|
-
static started(fn: (
|
|
12341
|
+
static started(fn: (...params: any[]) => any): Promise<void>;
|
|
12350
12342
|
/**
|
|
12351
12343
|
* Share data across worker threads
|
|
12352
12344
|
* @param options - set {local: true} to not share among workers
|
|
@@ -12603,20 +12595,6 @@ declare namespace CodeceptJS {
|
|
|
12603
12595
|
function pause(passedObject?: {
|
|
12604
12596
|
[key: string]: any;
|
|
12605
12597
|
}): void;
|
|
12606
|
-
/**
|
|
12607
|
-
* Creates a debug logger for a given namespace and optionally logs messages.
|
|
12608
|
-
* @example
|
|
12609
|
-
* // Log a message immediately
|
|
12610
|
-
* debugLog('codeceptjs:pause', 'This is a pause debug message.');
|
|
12611
|
-
* @example
|
|
12612
|
-
* // Create a reusable logger
|
|
12613
|
-
* const logger = debugLog('app:module');
|
|
12614
|
-
* logger('This is a reusable log for app:module.');
|
|
12615
|
-
* @param namespace - The namespace to use for the debug logger.
|
|
12616
|
-
* @param args - Additional arguments to log immediately.
|
|
12617
|
-
* @returns The debug logger instance for the given namespace.
|
|
12618
|
-
*/
|
|
12619
|
-
function debugLog(namespace: string, ...args: any[]): (...params: any[]) => any;
|
|
12620
12598
|
/**
|
|
12621
12599
|
* Singleton object to record all test steps as promises and run them in chain.
|
|
12622
12600
|
*/
|
|
@@ -12693,24 +12671,49 @@ declare namespace CodeceptJS {
|
|
|
12693
12671
|
function session(sessionName: CodeceptJS.LocatorOrString, config: ((...params: any[]) => any) | {
|
|
12694
12672
|
[key: string]: any;
|
|
12695
12673
|
}, fn?: (...params: any[]) => any): any;
|
|
12674
|
+
/**
|
|
12675
|
+
* StepConfig is a configuration object for a step.
|
|
12676
|
+
* It is used to create a new step that is a combination of other steps.
|
|
12677
|
+
*/
|
|
12678
|
+
class StepConfig {
|
|
12679
|
+
config: any;
|
|
12680
|
+
/**
|
|
12681
|
+
* Set the options for the step.
|
|
12682
|
+
* @param opts - The options for the step.
|
|
12683
|
+
* @returns - The step configuration object.
|
|
12684
|
+
*/
|
|
12685
|
+
opts(opts: any): StepConfig;
|
|
12686
|
+
/**
|
|
12687
|
+
* Set the timeout for the step.
|
|
12688
|
+
* @param timeout - The timeout for the step.
|
|
12689
|
+
* @returns - The step configuration object.
|
|
12690
|
+
*/
|
|
12691
|
+
timeout(timeout: number): StepConfig;
|
|
12692
|
+
/**
|
|
12693
|
+
* Set the retry for the step.
|
|
12694
|
+
* @param retry - The retry for the step.
|
|
12695
|
+
* @returns - The step configuration object.
|
|
12696
|
+
*/
|
|
12697
|
+
retry(retry: number): StepConfig;
|
|
12698
|
+
}
|
|
12696
12699
|
/**
|
|
12697
12700
|
* Each command in test executed through `I.` object is wrapped in Step.
|
|
12698
12701
|
* Step allows logging executed commands and triggers hook before and after step execution.
|
|
12699
12702
|
*/
|
|
12700
12703
|
class Step {
|
|
12701
|
-
constructor(
|
|
12702
|
-
actor: string;
|
|
12703
|
-
helper: CodeceptJS.Helper;
|
|
12704
|
+
constructor(name: string);
|
|
12704
12705
|
name: string;
|
|
12706
|
+
timeouts: Map<number, number>;
|
|
12707
|
+
args: any[];
|
|
12708
|
+
opts: Record<string, any>;
|
|
12709
|
+
actor: string;
|
|
12705
12710
|
helperMethod: string;
|
|
12706
12711
|
status: string;
|
|
12707
|
-
suffix: string;
|
|
12708
12712
|
prefix: string;
|
|
12709
12713
|
comment: string;
|
|
12710
|
-
|
|
12711
|
-
metaStep: MetaStep;
|
|
12714
|
+
metaStep: any;
|
|
12712
12715
|
stack: string;
|
|
12713
|
-
|
|
12716
|
+
timeout: any;
|
|
12714
12717
|
/**
|
|
12715
12718
|
* @param timeout - timeout in milliseconds or 0 if no timeout
|
|
12716
12719
|
* @param order - order defines the priority of timeout, timeouts set with lower order override those set with higher order.
|
|
@@ -12719,7 +12722,6 @@ declare namespace CodeceptJS {
|
|
|
12719
12722
|
setTimeout(timeout: number, order: number): void;
|
|
12720
12723
|
setTrace(): void;
|
|
12721
12724
|
setArguments(args: any[]): void;
|
|
12722
|
-
run(...args: any[]): any;
|
|
12723
12725
|
setStatus(status: string): void;
|
|
12724
12726
|
humanize(): string;
|
|
12725
12727
|
humanizeArgs(): string;
|
|
@@ -12728,11 +12730,6 @@ declare namespace CodeceptJS {
|
|
|
12728
12730
|
toCliStyled(): string;
|
|
12729
12731
|
toCode(): string;
|
|
12730
12732
|
hasBDDAncestor(): boolean;
|
|
12731
|
-
static MetaStep: typeof MetaStep;
|
|
12732
|
-
}
|
|
12733
|
-
class MetaStep extends Step {
|
|
12734
|
-
isBDD(): boolean;
|
|
12735
|
-
run(): any;
|
|
12736
12733
|
}
|
|
12737
12734
|
/**
|
|
12738
12735
|
* global values for current session
|
|
@@ -12743,6 +12740,7 @@ declare namespace CodeceptJS {
|
|
|
12743
12740
|
var dryRun: boolean;
|
|
12744
12741
|
var onPause: boolean;
|
|
12745
12742
|
var currentTest: CodeceptJS.Test | null;
|
|
12743
|
+
var currentStep: any;
|
|
12746
12744
|
}
|
|
12747
12745
|
/**
|
|
12748
12746
|
* Describe a "suite" with the given `title`
|
|
@@ -12769,6 +12767,10 @@ declare namespace CodeceptJS {
|
|
|
12769
12767
|
* Can inject values and add custom configuration.
|
|
12770
12768
|
*/
|
|
12771
12769
|
class FeatureConfig {
|
|
12770
|
+
/**
|
|
12771
|
+
* Set metadata for this suite
|
|
12772
|
+
*/
|
|
12773
|
+
meta(key: string, value: string): this;
|
|
12772
12774
|
/**
|
|
12773
12775
|
* Retry this test for number of times
|
|
12774
12776
|
*/
|
|
@@ -12803,6 +12805,10 @@ declare namespace CodeceptJS {
|
|
|
12803
12805
|
* Retry this test for x times
|
|
12804
12806
|
*/
|
|
12805
12807
|
retry(retries: number): this;
|
|
12808
|
+
/**
|
|
12809
|
+
* Set metadata for this test
|
|
12810
|
+
*/
|
|
12811
|
+
meta(key: string, value: string): this;
|
|
12806
12812
|
/**
|
|
12807
12813
|
* Set timeout for this test
|
|
12808
12814
|
*/
|
|
@@ -13435,22 +13441,12 @@ declare namespace CodeceptJS {
|
|
|
13435
13441
|
}
|
|
13436
13442
|
|
|
13437
13443
|
/**
|
|
13438
|
-
*
|
|
13439
|
-
*/
|
|
13440
|
-
declare var testOrSuite: any;
|
|
13441
|
-
|
|
13442
|
-
/**
|
|
13443
|
-
* 0-9 - designated for override of timeouts set from code, 5 is used by stepTimeout plugin when stepTimeout.config.overrideStepLimits=true
|
|
13444
|
-
*/
|
|
13445
|
-
declare var stepTimeoutHard: any;
|
|
13446
|
-
|
|
13447
|
-
/**
|
|
13448
|
-
* 10-19 - designated for timeouts set from code, 15 is order of I.setTimeout(t) operation
|
|
13444
|
+
* corresponding helper
|
|
13449
13445
|
*/
|
|
13450
|
-
declare var
|
|
13446
|
+
declare var helper: CodeceptJS.Helper;
|
|
13451
13447
|
|
|
13452
13448
|
/**
|
|
13453
|
-
*
|
|
13449
|
+
* name of method to be executed
|
|
13454
13450
|
*/
|
|
13455
|
-
declare var
|
|
13451
|
+
declare var helperMethod: string;
|
|
13456
13452
|
|