codeceptjs 3.7.2-beta.2 → 3.7.3

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.
@@ -3,6 +3,42 @@ const envinfo = require('envinfo')
3
3
  const { getConfig, getTestRoot } = require('./utils')
4
4
  const Codecept = require('../codecept')
5
5
  const output = require('../output')
6
+ const { execSync } = require('child_process')
7
+
8
+ async function getPlaywrightBrowsers() {
9
+ try {
10
+ const regex = /(chromium|firefox|webkit)\s+version\s+([\d.]+)/gi
11
+ let versions = []
12
+
13
+ const info = execSync('npx playwright install --dry-run').toString().trim()
14
+
15
+ const matches = [...info.matchAll(regex)]
16
+
17
+ matches.forEach(match => {
18
+ const browser = match[1]
19
+ const version = match[2]
20
+ versions.push(`${browser}: ${version}`)
21
+ })
22
+
23
+ return versions.join(', ')
24
+ } catch (err) {
25
+ return 'Playwright not installed'
26
+ }
27
+ }
28
+
29
+ async function getOsBrowsers() {
30
+ const chromeInfo = await envinfo.helpers.getChromeInfo()
31
+ const edgeInfo = await envinfo.helpers.getEdgeInfo()
32
+ const firefoxInfo = await envinfo.helpers.getFirefoxInfo()
33
+ const safariInfo = await envinfo.helpers.getSafariInfo()
34
+
35
+ return [
36
+ `chrome: ${chromeInfo ? chromeInfo[1] : 'not installed'}`,
37
+ `edge: ${edgeInfo ? edgeInfo[1] : 'not installed'}`,
38
+ `firefox: ${firefoxInfo ? firefoxInfo[1] : 'not installed'}`,
39
+ `safari: ${safariInfo ? safariInfo[1] : 'not installed'}`,
40
+ ].join(', ')
41
+ }
6
42
 
7
43
  module.exports = async function (path) {
8
44
  const testsPath = getTestRoot(path)
@@ -10,16 +46,15 @@ module.exports = async function (path) {
10
46
  const codecept = new Codecept(config, {})
11
47
  codecept.init(testsPath)
12
48
 
13
- output.print('\n Environment information:-\n')
49
+ output.print('\n Environment information: \n')
14
50
  const info = {}
15
51
  info.codeceptVersion = Codecept.version()
16
52
  info.nodeInfo = await envinfo.helpers.getNodeInfo()
17
53
  info.osInfo = await envinfo.helpers.getOSInfo()
18
54
  info.cpuInfo = await envinfo.helpers.getCPUInfo()
19
- info.chromeInfo = await envinfo.helpers.getChromeInfo()
20
- info.edgeInfo = await envinfo.helpers.getEdgeInfo()
21
- info.firefoxInfo = await envinfo.helpers.getFirefoxInfo()
22
- info.safariInfo = await envinfo.helpers.getSafariInfo()
55
+ info.osBrowsers = await getOsBrowsers()
56
+ info.playwrightBrowsers = await getPlaywrightBrowsers()
57
+
23
58
  const { helpers, plugins } = config
24
59
  info.helpers = helpers || "You don't use any helpers"
25
60
  info.plugins = plugins || "You don't have any enabled plugins"
@@ -47,6 +82,7 @@ module.exports.getMachineInfo = async () => {
47
82
  edgeInfo: await envinfo.helpers.getEdgeInfo(),
48
83
  firefoxInfo: await envinfo.helpers.getFirefoxInfo(),
49
84
  safariInfo: await envinfo.helpers.getSafariInfo(),
85
+ playwrightBrowsers: await getPlaywrightBrowsers(),
50
86
  }
51
87
 
52
88
  output.print('***************************************')
package/lib/container.js CHANGED
@@ -469,7 +469,7 @@ function loadGherkinSteps(paths) {
469
469
  loadSupportObject(path, `Step Definition from ${path}`)
470
470
  }
471
471
  } else {
472
- const folderPath = paths.startsWith('.') ? path.join(global.codecept_dir, paths) : ''
472
+ const folderPath = paths.startsWith('.') ? normalizeAndJoin(global.codecept_dir, paths) : ''
473
473
  if (folderPath !== '') {
474
474
  globSync(folderPath).forEach(file => {
475
475
  loadSupportObject(file, `Step Definition from ${file}`)
@@ -562,3 +562,16 @@ function getHelperModuleName(helperName, config) {
562
562
  // built-in helpers
563
563
  return `./helper/${helperName}`
564
564
  }
565
+ function normalizeAndJoin(basePath, subPath) {
566
+ // Normalize and convert slashes to forward slashes in one step
567
+ const normalizedBase = path.posix.normalize(basePath.replace(/\\/g, '/'))
568
+ const normalizedSub = path.posix.normalize(subPath.replace(/\\/g, '/'))
569
+
570
+ // If subPath is absolute (starts with "/"), return it as the final path
571
+ if (normalizedSub.startsWith('/')) {
572
+ return normalizedSub
573
+ }
574
+
575
+ // Join the paths using POSIX-style
576
+ return path.posix.join(normalizedBase, normalizedSub)
577
+ }
@@ -383,8 +383,10 @@ class Appium extends Webdriver {
383
383
 
384
384
  _buildAppiumEndpoint() {
385
385
  const { protocol, port, hostname, path } = this.browser.options
386
+ // Ensure path does NOT end with a slash to prevent double slashes
387
+ const normalizedPath = path.replace(/\/$/, '')
386
388
  // Build path to Appium REST API endpoint
387
- return `${protocol}://${hostname}:${port}${path}/session/${this.browser.sessionId}`
389
+ return `${protocol}://${hostname}:${port}${normalizedPath}/session/${this.browser.sessionId}`
388
390
  }
389
391
 
390
392
  /**
@@ -4,6 +4,7 @@ let currentSuite
4
4
 
5
5
  const Helper = require('@codeceptjs/helper')
6
6
  const { clearString } = require('../utils')
7
+ const { testToFileName } = require('../mocha/test')
7
8
 
8
9
  class Mochawesome extends Helper {
9
10
  constructor(config) {
@@ -50,7 +51,7 @@ class Mochawesome extends Helper {
50
51
  fileName = clearString(`${test.title}_${currentTest.test.title}`)
51
52
  } else {
52
53
  currentTest = { test }
53
- fileName = clearString(test.title)
54
+ fileName = `${testToFileName(test)}`
54
55
  }
55
56
  if (this.options.uniqueScreenshotNames) {
56
57
  const uuid = test.uuid || test.ctx.test.uuid
@@ -35,6 +35,7 @@ let browserLogs = []
35
35
  * @type {object}
36
36
  * @prop {string} url - base url of website to be tested.
37
37
  * @prop {string} browser - Browser in which to perform testing.
38
+ * @prop {boolean} [bidiProtocol=false] - WebDriver Bidi Protocol. Default: false. More info: https://webdriver.io/docs/api/webdriverBidi/
38
39
  * @prop {string} [basicAuth] - (optional) the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
39
40
  * @prop {string} [host=localhost] - WebDriver host to connect.
40
41
  * @prop {number} [port=4444] - WebDriver port to connect.
@@ -488,6 +489,10 @@ class WebDriver extends Helper {
488
489
  config.capabilities = config.desiredCapabilities
489
490
  }
490
491
  config.capabilities.browserName = config.browser || config.capabilities.browserName
492
+
493
+ // WebDriver Bidi Protocol. Default: false
494
+ config.capabilities.webSocketUrl = config.bidiProtocol ?? config.capabilities.webSocketUrl ?? true
495
+
491
496
  config.capabilities.browserVersion = config.browserVersion || config.capabilities.browserVersion
492
497
  if (config.capabilities.chromeOptions) {
493
498
  config.capabilities['goog:chromeOptions'] = config.capabilities.chromeOptions
@@ -3,6 +3,9 @@
3
3
  * Can inject values and add custom configuration.
4
4
  */
5
5
  class FeatureConfig {
6
+ /**
7
+ * @param {CodeceptJS.Suite} suite
8
+ */
6
9
  constructor(suite) {
7
10
  this.suite = suite
8
11
  }
@@ -41,12 +44,17 @@ class FeatureConfig {
41
44
  return this
42
45
  }
43
46
 
47
+ /**
48
+ * @callback FeatureConfigCallback
49
+ * @param {CodeceptJS.Suite} suite
50
+ * @returns {Object<string, any>}
51
+ */
52
+
44
53
  /**
45
54
  * Configures a helper.
46
55
  * Helper name can be omitted and values will be applied to first helper.
47
- *
48
- * @param {string|number} helper
49
- * @param {*} obj
56
+ * @param {string | Object<string, any> | FeatureConfigCallback} helper
57
+ * @param {Object<string, any>} [obj]
50
58
  * @returns {this}
51
59
  */
52
60
  config(helper, obj) {
@@ -2,6 +2,9 @@ const { isAsyncFunction } = require('../utils')
2
2
 
3
3
  /** @class */
4
4
  class ScenarioConfig {
5
+ /**
6
+ * @param {CodeceptJS.Test} test
7
+ */
5
8
  constructor(test) {
6
9
  this.test = test
7
10
  }
@@ -77,10 +80,16 @@ class ScenarioConfig {
77
80
  return this
78
81
  }
79
82
 
83
+ /**
84
+ * @callback ScenarioConfigCallback
85
+ * @param {CodeceptJS.Test} test
86
+ * @returns {Object<string, any>}
87
+ */
88
+
80
89
  /**
81
90
  * Configures a helper.
82
91
  * Helper name can be omitted and values will be applied to first helper.
83
- * @param {string | Object<string, any>} helper
92
+ * @param {string | Object<string, any> | ScenarioConfigCallback} helper
84
93
  * @param {Object<string, any>} [obj]
85
94
  * @returns {this}
86
95
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "3.7.2-beta.2",
3
+ "version": "3.7.3",
4
4
  "description": "Supercharged End 2 End Testing Framework for NodeJS",
5
5
  "keywords": [
6
6
  "acceptance",
@@ -75,15 +75,15 @@
75
75
  "publish-beta": "./runok.js publish:next-beta-version"
76
76
  },
77
77
  "dependencies": {
78
- "@codeceptjs/configure": "1.0.2",
78
+ "@codeceptjs/configure": "1.0.3",
79
79
  "@codeceptjs/helper": "2.0.4",
80
80
  "@cucumber/cucumber-expressions": "18",
81
- "@cucumber/gherkin": "31",
81
+ "@cucumber/gherkin": "32",
82
82
  "@cucumber/messages": "27.2.0",
83
- "@xmldom/xmldom": "0.9.7",
84
- "acorn": "8.14.0",
83
+ "@xmldom/xmldom": "0.9.8",
84
+ "acorn": "8.14.1",
85
85
  "arrify": "3.0.0",
86
- "axios": "1.7.9",
86
+ "axios": "1.8.3",
87
87
  "chalk": "4.1.2",
88
88
  "cheerio": "^1.0.0",
89
89
  "commander": "11.1.0",
@@ -101,12 +101,12 @@
101
101
  "inquirer": "8.2.6",
102
102
  "invisi-data": "^1.0.0",
103
103
  "joi": "17.13.3",
104
- "js-beautify": "1.15.2",
104
+ "js-beautify": "1.15.4",
105
105
  "lodash.clonedeep": "4.5.0",
106
106
  "lodash.merge": "4.6.2",
107
107
  "mkdirp": "3.0.1",
108
108
  "mocha": "11.1.0",
109
- "monocart-coverage-reports": "2.12.1",
109
+ "monocart-coverage-reports": "2.12.3",
110
110
  "ms": "2.1.3",
111
111
  "ora-classic": "5.4.2",
112
112
  "parse-function": "5.6.10",
@@ -114,38 +114,38 @@
114
114
  "promise-retry": "1.1.1",
115
115
  "resq": "1.11.0",
116
116
  "sprintf-js": "1.1.3",
117
- "uuid": "11.0.5"
117
+ "uuid": "11.1.0"
118
118
  },
119
119
  "optionalDependencies": {
120
- "@codeceptjs/detox-helper": "1.1.5"
120
+ "@codeceptjs/detox-helper": "1.1.7"
121
121
  },
122
122
  "devDependencies": {
123
123
  "@apollo/server": "^4",
124
- "@codeceptjs/expect-helper": "^0.2.2",
124
+ "@codeceptjs/expect-helper": "^1.0.1",
125
125
  "@codeceptjs/mock-request": "0.3.1",
126
- "@eslint/eslintrc": "3.2.0",
127
- "@eslint/js": "9.19.0",
128
- "@faker-js/faker": "9.4.0",
126
+ "@eslint/eslintrc": "3.3.0",
127
+ "@eslint/js": "9.22.0",
128
+ "@faker-js/faker": "9.6.0",
129
129
  "@pollyjs/adapter-puppeteer": "6.0.6",
130
- "@pollyjs/core": "5.1.0",
131
- "@types/chai": "4.3.19",
130
+ "@pollyjs/core": "6.0.6",
131
+ "@types/chai": "5.2.0",
132
132
  "@types/inquirer": "9.0.7",
133
- "@types/node": "22.13.0",
134
- "@wdio/sauce-service": "9.7.2",
133
+ "@types/node": "22.13.10",
134
+ "@wdio/sauce-service": "9.12.0",
135
135
  "@wdio/selenium-standalone-service": "8.15.0",
136
- "@wdio/utils": "9.7.2",
137
- "@xmldom/xmldom": "0.9.7",
136
+ "@wdio/utils": "9.11.0",
137
+ "@xmldom/xmldom": "0.9.8",
138
138
  "chai": "^4.0.0",
139
139
  "chai-as-promised": "7.1.2",
140
140
  "chai-subset": "1.6.0",
141
141
  "documentation": "14.0.3",
142
- "electron": "34.0.2",
143
- "eslint": "^9.19.0",
142
+ "electron": "35.0.1",
143
+ "eslint": "^9.21.0",
144
144
  "eslint-plugin-import": "2.31.0",
145
145
  "eslint-plugin-mocha": "10.5.0",
146
146
  "expect": "29.7.0",
147
147
  "express": "4.21.2",
148
- "globals": "15.14.0",
148
+ "globals": "16.0.0",
149
149
  "graphql": "16.10.0",
150
150
  "graphql-tag": "^2.12.6",
151
151
  "husky": "9.1.7",
@@ -153,25 +153,25 @@
153
153
  "jsdoc": "^3.6.11",
154
154
  "jsdoc-typeof-plugin": "1.0.0",
155
155
  "json-server": "0.17.4",
156
- "playwright": "1.50.1",
156
+ "playwright": "1.51.0",
157
157
  "prettier": "^3.3.2",
158
- "puppeteer": "24.1.1",
158
+ "puppeteer": "24.4.0",
159
159
  "qrcode-terminal": "0.12.0",
160
160
  "rosie": "2.1.1",
161
161
  "runok": "0.9.3",
162
162
  "semver": "7.7.1",
163
163
  "sinon": "19.0.2",
164
164
  "sinon-chai": "3.7.0",
165
- "testcafe": "3.7.1",
165
+ "testcafe": "3.7.2",
166
166
  "ts-morph": "25.0.1",
167
167
  "ts-node": "10.9.2",
168
168
  "tsd": "^0.31.0",
169
169
  "tsd-jsdoc": "2.5.0",
170
- "typedoc": "0.27.7",
171
- "typedoc-plugin-markdown": "4.4.1",
172
- "typescript": "5.7.3",
170
+ "typedoc": "0.28.0",
171
+ "typedoc-plugin-markdown": "4.5.0",
172
+ "typescript": "5.8.2",
173
173
  "wdio-docker-service": "3.2.1",
174
- "webdriverio": "9.7.2",
174
+ "webdriverio": "9.12.0",
175
175
  "xml2js": "0.6.2",
176
176
  "xpath": "0.0.34"
177
177
  },
@@ -1198,9 +1198,6 @@ declare namespace CodeceptJS {
1198
1198
  *
1199
1199
  * ## Methods
1200
1200
  */
1201
- // @ts-ignore
1202
- // @ts-ignore
1203
- // @ts-ignore
1204
1201
  class ExpectHelper {
1205
1202
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1206
1203
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
@@ -1312,9 +1309,6 @@ declare namespace CodeceptJS {
1312
1309
  *
1313
1310
  * ## Methods
1314
1311
  */
1315
- // @ts-ignore
1316
- // @ts-ignore
1317
- // @ts-ignore
1318
1312
  class ExpectHelper {
1319
1313
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1320
1314
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
@@ -1987,9 +1981,6 @@ declare namespace CodeceptJS {
1987
1981
  * @property [host = "0.0.0.0"] - Mock server host
1988
1982
  * @property [httpsOpts] - key & cert values are the paths to .key and .crt files
1989
1983
  */
1990
- // @ts-ignore
1991
- // @ts-ignore
1992
- // @ts-ignore
1993
1984
  type MockServerConfig = {
1994
1985
  port?: number;
1995
1986
  host?: string;
@@ -2114,9 +2105,6 @@ declare namespace CodeceptJS {
2114
2105
  *
2115
2106
  * ## Methods
2116
2107
  */
2117
- // @ts-ignore
2118
- // @ts-ignore
2119
- // @ts-ignore
2120
2108
  class MockServer {
2121
2109
  /**
2122
2110
  * Start the mock server
@@ -3190,9 +3178,6 @@ declare namespace CodeceptJS {
3190
3178
  * @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).
3191
3179
  * @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).
3192
3180
  */
3193
- // @ts-ignore
3194
- // @ts-ignore
3195
- // @ts-ignore
3196
3181
  type PlaywrightConfig = {
3197
3182
  url?: string;
3198
3183
  browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
@@ -6569,9 +6554,6 @@ declare namespace CodeceptJS {
6569
6554
  * @property [chrome] - pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
6570
6555
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
6571
6556
  */
6572
- // @ts-ignore
6573
- // @ts-ignore
6574
- // @ts-ignore
6575
6557
  type PuppeteerConfig = {
6576
6558
  url: string;
6577
6559
  basicAuth?: any;
@@ -8378,9 +8360,6 @@ declare namespace CodeceptJS {
8378
8360
  * @property [onResponse] - an async function which can update response object.
8379
8361
  * @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
8380
8362
  */
8381
- // @ts-ignore
8382
- // @ts-ignore
8383
- // @ts-ignore
8384
8363
  type RESTConfig = {
8385
8364
  endpoint?: string;
8386
8365
  prettyPrintJson?: boolean;
@@ -9749,6 +9728,7 @@ declare namespace CodeceptJS {
9749
9728
  * This helper should be configured in codecept.conf.js
9750
9729
  * @property url - base url of website to be tested.
9751
9730
  * @property browser - Browser in which to perform testing.
9731
+ * @property [bidiProtocol = false] - WebDriver Bidi Protocol. Default: false. More info: https://webdriver.io/docs/api/webdriverBidi/
9752
9732
  * @property [basicAuth] - (optional) the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
9753
9733
  * @property [host = localhost] - WebDriver host to connect.
9754
9734
  * @property [port = 4444] - WebDriver port to connect.
@@ -9769,12 +9749,10 @@ declare namespace CodeceptJS {
9769
9749
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
9770
9750
  * @property [logLevel = silent] - level of logging verbosity. Default: silent. Options: trace | debug | info | warn | error | silent. More info: https://webdriver.io/docs/configuration/#loglevel
9771
9751
  */
9772
- // @ts-ignore
9773
- // @ts-ignore
9774
- // @ts-ignore
9775
9752
  type WebDriverConfig = {
9776
9753
  url: string;
9777
9754
  browser: string;
9755
+ bidiProtocol?: boolean;
9778
9756
  basicAuth?: string;
9779
9757
  host?: string;
9780
9758
  port?: number;
@@ -1222,9 +1222,6 @@ declare namespace CodeceptJS {
1222
1222
  *
1223
1223
  * ## Methods
1224
1224
  */
1225
- // @ts-ignore
1226
- // @ts-ignore
1227
- // @ts-ignore
1228
1225
  class ExpectHelper {
1229
1226
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1230
1227
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
@@ -1336,9 +1333,6 @@ declare namespace CodeceptJS {
1336
1333
  *
1337
1334
  * ## Methods
1338
1335
  */
1339
- // @ts-ignore
1340
- // @ts-ignore
1341
- // @ts-ignore
1342
1336
  class ExpectHelper {
1343
1337
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1344
1338
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
@@ -2014,9 +2008,6 @@ declare namespace CodeceptJS {
2014
2008
  * @property [host = "0.0.0.0"] - Mock server host
2015
2009
  * @property [httpsOpts] - key & cert values are the paths to .key and .crt files
2016
2010
  */
2017
- // @ts-ignore
2018
- // @ts-ignore
2019
- // @ts-ignore
2020
2011
  type MockServerConfig = {
2021
2012
  port?: number;
2022
2013
  host?: string;
@@ -2141,9 +2132,6 @@ declare namespace CodeceptJS {
2141
2132
  *
2142
2133
  * ## Methods
2143
2134
  */
2144
- // @ts-ignore
2145
- // @ts-ignore
2146
- // @ts-ignore
2147
2135
  class MockServer {
2148
2136
  /**
2149
2137
  * Start the mock server
@@ -3283,9 +3271,6 @@ declare namespace CodeceptJS {
3283
3271
  * @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).
3284
3272
  * @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).
3285
3273
  */
3286
- // @ts-ignore
3287
- // @ts-ignore
3288
- // @ts-ignore
3289
3274
  type PlaywrightConfig = {
3290
3275
  url?: string;
3291
3276
  browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
@@ -6813,9 +6798,6 @@ declare namespace CodeceptJS {
6813
6798
  * @property [chrome] - pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
6814
6799
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
6815
6800
  */
6816
- // @ts-ignore
6817
- // @ts-ignore
6818
- // @ts-ignore
6819
6801
  type PuppeteerConfig = {
6820
6802
  url: string;
6821
6803
  basicAuth?: any;
@@ -8758,9 +8740,6 @@ declare namespace CodeceptJS {
8758
8740
  * @property [onResponse] - an async function which can update response object.
8759
8741
  * @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
8760
8742
  */
8761
- // @ts-ignore
8762
- // @ts-ignore
8763
- // @ts-ignore
8764
8743
  type RESTConfig = {
8765
8744
  endpoint?: string;
8766
8745
  prettyPrintJson?: boolean;
@@ -10189,6 +10168,7 @@ declare namespace CodeceptJS {
10189
10168
  * This helper should be configured in codecept.conf.js
10190
10169
  * @property url - base url of website to be tested.
10191
10170
  * @property browser - Browser in which to perform testing.
10171
+ * @property [bidiProtocol = false] - WebDriver Bidi Protocol. Default: false. More info: https://webdriver.io/docs/api/webdriverBidi/
10192
10172
  * @property [basicAuth] - (optional) the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
10193
10173
  * @property [host = localhost] - WebDriver host to connect.
10194
10174
  * @property [port = 4444] - WebDriver port to connect.
@@ -10209,12 +10189,10 @@ declare namespace CodeceptJS {
10209
10189
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
10210
10190
  * @property [logLevel = silent] - level of logging verbosity. Default: silent. Options: trace | debug | info | warn | error | silent. More info: https://webdriver.io/docs/configuration/#loglevel
10211
10191
  */
10212
- // @ts-ignore
10213
- // @ts-ignore
10214
- // @ts-ignore
10215
10192
  type WebDriverConfig = {
10216
10193
  url: string;
10217
10194
  browser: string;
10195
+ bidiProtocol?: boolean;
10218
10196
  basicAuth?: string;
10219
10197
  host?: string;
10220
10198
  port?: number;
@@ -12791,6 +12769,7 @@ declare namespace CodeceptJS {
12791
12769
  * Can inject values and add custom configuration.
12792
12770
  */
12793
12771
  class FeatureConfig {
12772
+ constructor(suite: CodeceptJS.Suite);
12794
12773
  /**
12795
12774
  * Set metadata for this suite
12796
12775
  */
@@ -12807,13 +12786,21 @@ declare namespace CodeceptJS {
12807
12786
  * Configures a helper.
12808
12787
  * Helper name can be omitted and values will be applied to first helper.
12809
12788
  */
12810
- config(helper: string | number, obj: any): this;
12789
+ config(helper: string | {
12790
+ [key: string]: any;
12791
+ } | FeatureConfigCallback, obj?: {
12792
+ [key: string]: any;
12793
+ }): this;
12811
12794
  /**
12812
12795
  * Append a tag name to scenario title
12813
12796
  */
12814
12797
  tag(tagName: string): this;
12815
12798
  }
12799
+ type FeatureConfigCallback = (suite: CodeceptJS.Suite) => {
12800
+ [key: string]: any;
12801
+ };
12816
12802
  class ScenarioConfig {
12803
+ constructor(test: CodeceptJS.Test);
12817
12804
  /**
12818
12805
  * Declares that test throws error.
12819
12806
  * Can pass an Error object or regex matching expected message.
@@ -12849,7 +12836,7 @@ declare namespace CodeceptJS {
12849
12836
  */
12850
12837
  config(helper: string | {
12851
12838
  [key: string]: any;
12852
- }, obj?: {
12839
+ } | ScenarioConfigCallback, obj?: {
12853
12840
  [key: string]: any;
12854
12841
  }): this;
12855
12842
  /**
@@ -12863,6 +12850,9 @@ declare namespace CodeceptJS {
12863
12850
  [key: string]: any;
12864
12851
  }): this;
12865
12852
  }
12853
+ type ScenarioConfigCallback = (test: CodeceptJS.Test) => {
12854
+ [key: string]: any;
12855
+ };
12866
12856
  function addStep(step: any, fn: any): void;
12867
12857
  /**
12868
12858
  * Creates a new Hook instance