codeceptjs 3.6.6 → 3.6.8-beta.1

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.
@@ -434,8 +434,8 @@ class Appium extends Webdriver {
434
434
  async runOnIOS(caps, fn) {
435
435
  if (this.platform !== 'ios') return
436
436
  recorder.session.start('iOS-only actions')
437
- await this._runWithCaps(caps, fn)
438
- await recorder.add('restore from iOS session', () => recorder.session.restore())
437
+ this._runWithCaps(caps, fn)
438
+ recorder.add('restore from iOS session', () => recorder.session.restore())
439
439
  return recorder.promise()
440
440
  }
441
441
 
@@ -476,8 +476,8 @@ class Appium extends Webdriver {
476
476
  async runOnAndroid(caps, fn) {
477
477
  if (this.platform !== 'android') return
478
478
  recorder.session.start('Android-only actions')
479
- await this._runWithCaps(caps, fn)
480
- await recorder.add('restore from Android session', () => recorder.session.restore())
479
+ this._runWithCaps(caps, fn)
480
+ recorder.add('restore from Android session', () => recorder.session.restore())
481
481
  return recorder.promise()
482
482
  }
483
483
 
@@ -503,7 +503,7 @@ class Appium extends Webdriver {
503
503
  }
504
504
  /* eslint-enable */
505
505
 
506
- async _runWithCaps(caps, fn) {
506
+ _runWithCaps(caps, fn) {
507
507
  if (typeof caps === 'object') {
508
508
  for (const key in caps) {
509
509
  // skip if capabilities do not match
@@ -3435,7 +3435,7 @@ class Playwright extends Helper {
3435
3435
  }
3436
3436
 
3437
3437
  _logWebsocketMessages(message) {
3438
- this.webSocketMessages += message
3438
+ this.webSocketMessages.push(message)
3439
3439
  }
3440
3440
  }
3441
3441
 
@@ -2772,7 +2772,7 @@ class Puppeteer extends Helper {
2772
2772
  }
2773
2773
 
2774
2774
  _logWebsocketMessages(message) {
2775
- this.webSocketMessages += message
2775
+ this.webSocketMessages.push(message)
2776
2776
  }
2777
2777
  }
2778
2778
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "3.6.6",
3
+ "version": "3.6.8-beta.1",
4
4
  "description": "Supercharged End 2 End Testing Framework for NodeJS",
5
5
  "keywords": [
6
6
  "acceptance",
@@ -73,9 +73,9 @@
73
73
  "@codeceptjs/configure": "1.0.1",
74
74
  "@codeceptjs/helper": "2.0.4",
75
75
  "@cucumber/cucumber-expressions": "17",
76
- "@cucumber/gherkin": "26",
76
+ "@cucumber/gherkin": "29",
77
77
  "@cucumber/messages": "25.0.1",
78
- "@xmldom/xmldom": "0.8.10",
78
+ "@xmldom/xmldom": "0.9.4",
79
79
  "acorn": "8.12.1",
80
80
  "arrify": "2.0.1",
81
81
  "axios": "1.7.7",
@@ -92,7 +92,7 @@
92
92
  "css-to-xpath": "0.1.0",
93
93
  "csstoxpath": "1.6.0",
94
94
  "devtools": "8.40.2",
95
- "envinfo": "7.11.1",
95
+ "envinfo": "7.14.0",
96
96
  "escape-string-regexp": "4.0.0",
97
97
  "figures": "3.2.0",
98
98
  "fn-args": "4.0.0",
@@ -122,19 +122,20 @@
122
122
  },
123
123
  "devDependencies": {
124
124
  "@codeceptjs/mock-request": "0.3.1",
125
- "@faker-js/faker": "7.6.0",
125
+ "@faker-js/faker": "9.0.3",
126
126
  "@pollyjs/adapter-puppeteer": "6.0.6",
127
127
  "@pollyjs/core": "5.1.0",
128
128
  "@types/chai": "4.3.19",
129
129
  "@types/inquirer": "9.0.3",
130
130
  "@types/node": "22.5.5",
131
- "@wdio/sauce-service": "9.0.4",
131
+ "@wdio/sauce-service": "9.0.9",
132
132
  "@wdio/selenium-standalone-service": "8.3.2",
133
- "@wdio/utils": "9.0.6",
134
- "@xmldom/xmldom": "0.8.10",
133
+ "@wdio/utils": "9.1.2",
134
+ "@xmldom/xmldom": "0.9.4",
135
135
  "apollo-server-express": "2.25.3",
136
136
  "chai-as-promised": "7.1.2",
137
137
  "chai-subset": "1.6.0",
138
+ "cheerio": "^1.0.0",
138
139
  "contributor-faces": "1.1.0",
139
140
  "documentation": "12.3.0",
140
141
  "electron": "31.3.1",
@@ -145,7 +146,7 @@
145
146
  "expect": "29.7.0",
146
147
  "express": "4.19.2",
147
148
  "graphql": "16.9.0",
148
- "husky": "9.1.5",
149
+ "husky": "9.1.6",
149
150
  "inquirer-test": "2.0.1",
150
151
  "jsdoc": "4.0.3",
151
152
  "jsdoc-typeof-plugin": "1.0.0",
@@ -165,8 +166,8 @@
165
166
  "tsd": "^0.31.0",
166
167
  "tsd-jsdoc": "2.5.0",
167
168
  "typedoc": "0.26.7",
168
- "typedoc-plugin-markdown": "4.2.6",
169
- "typescript": "5.6.2",
169
+ "typedoc-plugin-markdown": "4.2.9",
170
+ "typescript": "5.6.3",
170
171
  "wdio-docker-service": "1.5.0",
171
172
  "webdriverio": "8.39.1",
172
173
  "xml2js": "0.6.2",
@@ -183,4 +184,4 @@
183
184
  "strict": false
184
185
  }
185
186
  }
186
- }
187
+ }
@@ -1180,6 +1180,14 @@ declare namespace CodeceptJS {
1180
1180
  *
1181
1181
  * ## Methods
1182
1182
  */
1183
+ // @ts-ignore
1184
+ // @ts-ignore
1185
+ // @ts-ignore
1186
+ // @ts-ignore
1187
+ // @ts-ignore
1188
+ // @ts-ignore
1189
+ // @ts-ignore
1190
+ // @ts-ignore
1183
1191
  class ExpectHelper {
1184
1192
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1185
1193
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
@@ -1291,6 +1299,14 @@ declare namespace CodeceptJS {
1291
1299
  *
1292
1300
  * ## Methods
1293
1301
  */
1302
+ // @ts-ignore
1303
+ // @ts-ignore
1304
+ // @ts-ignore
1305
+ // @ts-ignore
1306
+ // @ts-ignore
1307
+ // @ts-ignore
1308
+ // @ts-ignore
1309
+ // @ts-ignore
1294
1310
  class ExpectHelper {
1295
1311
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1296
1312
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
@@ -1962,6 +1978,14 @@ declare namespace CodeceptJS {
1962
1978
  * @property [host = "0.0.0.0"] - Mock server host
1963
1979
  * @property [httpsOpts] - key & cert values are the paths to .key and .crt files
1964
1980
  */
1981
+ // @ts-ignore
1982
+ // @ts-ignore
1983
+ // @ts-ignore
1984
+ // @ts-ignore
1985
+ // @ts-ignore
1986
+ // @ts-ignore
1987
+ // @ts-ignore
1988
+ // @ts-ignore
1965
1989
  type MockServerConfig = {
1966
1990
  port?: number;
1967
1991
  host?: string;
@@ -2086,6 +2110,14 @@ declare namespace CodeceptJS {
2086
2110
  *
2087
2111
  * ## Methods
2088
2112
  */
2113
+ // @ts-ignore
2114
+ // @ts-ignore
2115
+ // @ts-ignore
2116
+ // @ts-ignore
2117
+ // @ts-ignore
2118
+ // @ts-ignore
2119
+ // @ts-ignore
2120
+ // @ts-ignore
2089
2121
  class MockServer {
2090
2122
  /**
2091
2123
  * Start the mock server
@@ -3159,6 +3191,14 @@ declare namespace CodeceptJS {
3159
3191
  * @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).
3160
3192
  * @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).
3161
3193
  */
3194
+ // @ts-ignore
3195
+ // @ts-ignore
3196
+ // @ts-ignore
3197
+ // @ts-ignore
3198
+ // @ts-ignore
3199
+ // @ts-ignore
3200
+ // @ts-ignore
3201
+ // @ts-ignore
3162
3202
  type PlaywrightConfig = {
3163
3203
  url?: string;
3164
3204
  browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
@@ -6535,6 +6575,14 @@ declare namespace CodeceptJS {
6535
6575
  * @property [chrome] - pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
6536
6576
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
6537
6577
  */
6578
+ // @ts-ignore
6579
+ // @ts-ignore
6580
+ // @ts-ignore
6581
+ // @ts-ignore
6582
+ // @ts-ignore
6583
+ // @ts-ignore
6584
+ // @ts-ignore
6585
+ // @ts-ignore
6538
6586
  type PuppeteerConfig = {
6539
6587
  url: string;
6540
6588
  basicAuth?: any;
@@ -8341,6 +8389,14 @@ declare namespace CodeceptJS {
8341
8389
  * @property [onResponse] - an async function which can update response object.
8342
8390
  * @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
8343
8391
  */
8392
+ // @ts-ignore
8393
+ // @ts-ignore
8394
+ // @ts-ignore
8395
+ // @ts-ignore
8396
+ // @ts-ignore
8397
+ // @ts-ignore
8398
+ // @ts-ignore
8399
+ // @ts-ignore
8344
8400
  type RESTConfig = {
8345
8401
  endpoint?: string;
8346
8402
  prettyPrintJson?: boolean;
@@ -9719,6 +9775,14 @@ declare namespace CodeceptJS {
9719
9775
  * @property [logLevel = silent] - level of logging verbosity. Default: silent. Options: trace | debug | info | warn | error | silent. More info: https://webdriver.io/docs/configuration/#loglevel
9720
9776
  * @property [devtoolsProtocol = false] - enable devtools protocol. Default: false. More info: https://webdriver.io/docs/automationProtocols/#devtools-protocol.
9721
9777
  */
9778
+ // @ts-ignore
9779
+ // @ts-ignore
9780
+ // @ts-ignore
9781
+ // @ts-ignore
9782
+ // @ts-ignore
9783
+ // @ts-ignore
9784
+ // @ts-ignore
9785
+ // @ts-ignore
9722
9786
  type WebDriverConfig = {
9723
9787
  url: string;
9724
9788
  browser: string;
@@ -1204,6 +1204,14 @@ declare namespace CodeceptJS {
1204
1204
  *
1205
1205
  * ## Methods
1206
1206
  */
1207
+ // @ts-ignore
1208
+ // @ts-ignore
1209
+ // @ts-ignore
1210
+ // @ts-ignore
1211
+ // @ts-ignore
1212
+ // @ts-ignore
1213
+ // @ts-ignore
1214
+ // @ts-ignore
1207
1215
  class ExpectHelper {
1208
1216
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1209
1217
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
@@ -1315,6 +1323,14 @@ declare namespace CodeceptJS {
1315
1323
  *
1316
1324
  * ## Methods
1317
1325
  */
1326
+ // @ts-ignore
1327
+ // @ts-ignore
1328
+ // @ts-ignore
1329
+ // @ts-ignore
1330
+ // @ts-ignore
1331
+ // @ts-ignore
1332
+ // @ts-ignore
1333
+ // @ts-ignore
1318
1334
  class ExpectHelper {
1319
1335
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1320
1336
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
@@ -1989,6 +2005,14 @@ declare namespace CodeceptJS {
1989
2005
  * @property [host = "0.0.0.0"] - Mock server host
1990
2006
  * @property [httpsOpts] - key & cert values are the paths to .key and .crt files
1991
2007
  */
2008
+ // @ts-ignore
2009
+ // @ts-ignore
2010
+ // @ts-ignore
2011
+ // @ts-ignore
2012
+ // @ts-ignore
2013
+ // @ts-ignore
2014
+ // @ts-ignore
2015
+ // @ts-ignore
1992
2016
  type MockServerConfig = {
1993
2017
  port?: number;
1994
2018
  host?: string;
@@ -2113,6 +2137,14 @@ declare namespace CodeceptJS {
2113
2137
  *
2114
2138
  * ## Methods
2115
2139
  */
2140
+ // @ts-ignore
2141
+ // @ts-ignore
2142
+ // @ts-ignore
2143
+ // @ts-ignore
2144
+ // @ts-ignore
2145
+ // @ts-ignore
2146
+ // @ts-ignore
2147
+ // @ts-ignore
2116
2148
  class MockServer {
2117
2149
  /**
2118
2150
  * Start the mock server
@@ -3252,6 +3284,14 @@ declare namespace CodeceptJS {
3252
3284
  * @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).
3253
3285
  * @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).
3254
3286
  */
3287
+ // @ts-ignore
3288
+ // @ts-ignore
3289
+ // @ts-ignore
3290
+ // @ts-ignore
3291
+ // @ts-ignore
3292
+ // @ts-ignore
3293
+ // @ts-ignore
3294
+ // @ts-ignore
3255
3295
  type PlaywrightConfig = {
3256
3296
  url?: string;
3257
3297
  browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
@@ -6779,6 +6819,14 @@ declare namespace CodeceptJS {
6779
6819
  * @property [chrome] - pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
6780
6820
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
6781
6821
  */
6822
+ // @ts-ignore
6823
+ // @ts-ignore
6824
+ // @ts-ignore
6825
+ // @ts-ignore
6826
+ // @ts-ignore
6827
+ // @ts-ignore
6828
+ // @ts-ignore
6829
+ // @ts-ignore
6782
6830
  type PuppeteerConfig = {
6783
6831
  url: string;
6784
6832
  basicAuth?: any;
@@ -8721,6 +8769,14 @@ declare namespace CodeceptJS {
8721
8769
  * @property [onResponse] - an async function which can update response object.
8722
8770
  * @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
8723
8771
  */
8772
+ // @ts-ignore
8773
+ // @ts-ignore
8774
+ // @ts-ignore
8775
+ // @ts-ignore
8776
+ // @ts-ignore
8777
+ // @ts-ignore
8778
+ // @ts-ignore
8779
+ // @ts-ignore
8724
8780
  type RESTConfig = {
8725
8781
  endpoint?: string;
8726
8782
  prettyPrintJson?: boolean;
@@ -10159,6 +10215,14 @@ declare namespace CodeceptJS {
10159
10215
  * @property [logLevel = silent] - level of logging verbosity. Default: silent. Options: trace | debug | info | warn | error | silent. More info: https://webdriver.io/docs/configuration/#loglevel
10160
10216
  * @property [devtoolsProtocol = false] - enable devtools protocol. Default: false. More info: https://webdriver.io/docs/automationProtocols/#devtools-protocol.
10161
10217
  */
10218
+ // @ts-ignore
10219
+ // @ts-ignore
10220
+ // @ts-ignore
10221
+ // @ts-ignore
10222
+ // @ts-ignore
10223
+ // @ts-ignore
10224
+ // @ts-ignore
10225
+ // @ts-ignore
10162
10226
  type WebDriverConfig = {
10163
10227
  url: string;
10164
10228
  browser: string;