codeceptjs 3.7.0-beta.10 → 3.7.0-beta.11

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/lib/container.js CHANGED
@@ -34,6 +34,13 @@ let container = {
34
34
  * Dependency Injection Container
35
35
  */
36
36
  class Container {
37
+ /**
38
+ * Get the standard acting helpers of CodeceptJS Container
39
+ *
40
+ */
41
+ static get STANDARD_ACTING_HELPERS() {
42
+ return ['Playwright', 'WebDriver', 'Puppeteer', 'Appium', 'TestCafe']
43
+ }
37
44
  /**
38
45
  * Create container with all required helpers and support objects
39
46
  *
@@ -205,8 +212,6 @@ class Container {
205
212
  }
206
213
  }
207
214
 
208
- Container.STANDARD_ACTING_HELPERS = ['Playwright', 'WebDriver', 'Puppeteer', 'Appium', 'TestCafe']
209
-
210
215
  module.exports = Container
211
216
 
212
217
  function createHelpers(config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "3.7.0-beta.10",
3
+ "version": "3.7.0-beta.11",
4
4
  "description": "Supercharged End 2 End Testing Framework for NodeJS",
5
5
  "keywords": [
6
6
  "acceptance",
@@ -1198,25 +1198,6 @@ declare namespace CodeceptJS {
1198
1198
  *
1199
1199
  * ## Methods
1200
1200
  */
1201
- // @ts-ignore
1202
- // @ts-ignore
1203
- // @ts-ignore
1204
- // @ts-ignore
1205
- // @ts-ignore
1206
- // @ts-ignore
1207
- // @ts-ignore
1208
- // @ts-ignore
1209
- // @ts-ignore
1210
- // @ts-ignore
1211
- // @ts-ignore
1212
- // @ts-ignore
1213
- // @ts-ignore
1214
- // @ts-ignore
1215
- // @ts-ignore
1216
- // @ts-ignore
1217
- // @ts-ignore
1218
- // @ts-ignore
1219
- // @ts-ignore
1220
1201
  class ExpectHelper {
1221
1202
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1222
1203
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
@@ -1328,25 +1309,6 @@ declare namespace CodeceptJS {
1328
1309
  *
1329
1310
  * ## Methods
1330
1311
  */
1331
- // @ts-ignore
1332
- // @ts-ignore
1333
- // @ts-ignore
1334
- // @ts-ignore
1335
- // @ts-ignore
1336
- // @ts-ignore
1337
- // @ts-ignore
1338
- // @ts-ignore
1339
- // @ts-ignore
1340
- // @ts-ignore
1341
- // @ts-ignore
1342
- // @ts-ignore
1343
- // @ts-ignore
1344
- // @ts-ignore
1345
- // @ts-ignore
1346
- // @ts-ignore
1347
- // @ts-ignore
1348
- // @ts-ignore
1349
- // @ts-ignore
1350
1312
  class ExpectHelper {
1351
1313
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1352
1314
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
@@ -2019,25 +1981,6 @@ declare namespace CodeceptJS {
2019
1981
  * @property [host = "0.0.0.0"] - Mock server host
2020
1982
  * @property [httpsOpts] - key & cert values are the paths to .key and .crt files
2021
1983
  */
2022
- // @ts-ignore
2023
- // @ts-ignore
2024
- // @ts-ignore
2025
- // @ts-ignore
2026
- // @ts-ignore
2027
- // @ts-ignore
2028
- // @ts-ignore
2029
- // @ts-ignore
2030
- // @ts-ignore
2031
- // @ts-ignore
2032
- // @ts-ignore
2033
- // @ts-ignore
2034
- // @ts-ignore
2035
- // @ts-ignore
2036
- // @ts-ignore
2037
- // @ts-ignore
2038
- // @ts-ignore
2039
- // @ts-ignore
2040
- // @ts-ignore
2041
1984
  type MockServerConfig = {
2042
1985
  port?: number;
2043
1986
  host?: string;
@@ -2162,25 +2105,6 @@ declare namespace CodeceptJS {
2162
2105
  *
2163
2106
  * ## Methods
2164
2107
  */
2165
- // @ts-ignore
2166
- // @ts-ignore
2167
- // @ts-ignore
2168
- // @ts-ignore
2169
- // @ts-ignore
2170
- // @ts-ignore
2171
- // @ts-ignore
2172
- // @ts-ignore
2173
- // @ts-ignore
2174
- // @ts-ignore
2175
- // @ts-ignore
2176
- // @ts-ignore
2177
- // @ts-ignore
2178
- // @ts-ignore
2179
- // @ts-ignore
2180
- // @ts-ignore
2181
- // @ts-ignore
2182
- // @ts-ignore
2183
- // @ts-ignore
2184
2108
  class MockServer {
2185
2109
  /**
2186
2110
  * Start the mock server
@@ -3254,25 +3178,6 @@ declare namespace CodeceptJS {
3254
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).
3255
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).
3256
3180
  */
3257
- // @ts-ignore
3258
- // @ts-ignore
3259
- // @ts-ignore
3260
- // @ts-ignore
3261
- // @ts-ignore
3262
- // @ts-ignore
3263
- // @ts-ignore
3264
- // @ts-ignore
3265
- // @ts-ignore
3266
- // @ts-ignore
3267
- // @ts-ignore
3268
- // @ts-ignore
3269
- // @ts-ignore
3270
- // @ts-ignore
3271
- // @ts-ignore
3272
- // @ts-ignore
3273
- // @ts-ignore
3274
- // @ts-ignore
3275
- // @ts-ignore
3276
3181
  type PlaywrightConfig = {
3277
3182
  url?: string;
3278
3183
  browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
@@ -6649,25 +6554,6 @@ declare namespace CodeceptJS {
6649
6554
  * @property [chrome] - pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
6650
6555
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
6651
6556
  */
6652
- // @ts-ignore
6653
- // @ts-ignore
6654
- // @ts-ignore
6655
- // @ts-ignore
6656
- // @ts-ignore
6657
- // @ts-ignore
6658
- // @ts-ignore
6659
- // @ts-ignore
6660
- // @ts-ignore
6661
- // @ts-ignore
6662
- // @ts-ignore
6663
- // @ts-ignore
6664
- // @ts-ignore
6665
- // @ts-ignore
6666
- // @ts-ignore
6667
- // @ts-ignore
6668
- // @ts-ignore
6669
- // @ts-ignore
6670
- // @ts-ignore
6671
6557
  type PuppeteerConfig = {
6672
6558
  url: string;
6673
6559
  basicAuth?: any;
@@ -8474,25 +8360,6 @@ declare namespace CodeceptJS {
8474
8360
  * @property [onResponse] - an async function which can update response object.
8475
8361
  * @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
8476
8362
  */
8477
- // @ts-ignore
8478
- // @ts-ignore
8479
- // @ts-ignore
8480
- // @ts-ignore
8481
- // @ts-ignore
8482
- // @ts-ignore
8483
- // @ts-ignore
8484
- // @ts-ignore
8485
- // @ts-ignore
8486
- // @ts-ignore
8487
- // @ts-ignore
8488
- // @ts-ignore
8489
- // @ts-ignore
8490
- // @ts-ignore
8491
- // @ts-ignore
8492
- // @ts-ignore
8493
- // @ts-ignore
8494
- // @ts-ignore
8495
- // @ts-ignore
8496
8363
  type RESTConfig = {
8497
8364
  endpoint?: string;
8498
8365
  prettyPrintJson?: boolean;
@@ -9881,25 +9748,6 @@ declare namespace CodeceptJS {
9881
9748
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
9882
9749
  * @property [logLevel = silent] - level of logging verbosity. Default: silent. Options: trace | debug | info | warn | error | silent. More info: https://webdriver.io/docs/configuration/#loglevel
9883
9750
  */
9884
- // @ts-ignore
9885
- // @ts-ignore
9886
- // @ts-ignore
9887
- // @ts-ignore
9888
- // @ts-ignore
9889
- // @ts-ignore
9890
- // @ts-ignore
9891
- // @ts-ignore
9892
- // @ts-ignore
9893
- // @ts-ignore
9894
- // @ts-ignore
9895
- // @ts-ignore
9896
- // @ts-ignore
9897
- // @ts-ignore
9898
- // @ts-ignore
9899
- // @ts-ignore
9900
- // @ts-ignore
9901
- // @ts-ignore
9902
- // @ts-ignore
9903
9751
  type WebDriverConfig = {
9904
9752
  url: string;
9905
9753
  browser: string;
@@ -1222,25 +1222,6 @@ declare namespace CodeceptJS {
1222
1222
  *
1223
1223
  * ## Methods
1224
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
1244
1225
  class ExpectHelper {
1245
1226
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1246
1227
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
@@ -1352,25 +1333,6 @@ declare namespace CodeceptJS {
1352
1333
  *
1353
1334
  * ## Methods
1354
1335
  */
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
1374
1336
  class ExpectHelper {
1375
1337
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
1376
1338
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
@@ -2046,25 +2008,6 @@ declare namespace CodeceptJS {
2046
2008
  * @property [host = "0.0.0.0"] - Mock server host
2047
2009
  * @property [httpsOpts] - key & cert values are the paths to .key and .crt files
2048
2010
  */
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
2068
2011
  type MockServerConfig = {
2069
2012
  port?: number;
2070
2013
  host?: string;
@@ -2189,25 +2132,6 @@ declare namespace CodeceptJS {
2189
2132
  *
2190
2133
  * ## Methods
2191
2134
  */
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
2211
2135
  class MockServer {
2212
2136
  /**
2213
2137
  * Start the mock server
@@ -3347,25 +3271,6 @@ declare namespace CodeceptJS {
3347
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).
3348
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).
3349
3273
  */
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
3369
3274
  type PlaywrightConfig = {
3370
3275
  url?: string;
3371
3276
  browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
@@ -6893,25 +6798,6 @@ declare namespace CodeceptJS {
6893
6798
  * @property [chrome] - pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
6894
6799
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
6895
6800
  */
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
6915
6801
  type PuppeteerConfig = {
6916
6802
  url: string;
6917
6803
  basicAuth?: any;
@@ -8854,25 +8740,6 @@ declare namespace CodeceptJS {
8854
8740
  * @property [onResponse] - an async function which can update response object.
8855
8741
  * @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
8856
8742
  */
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
8876
8743
  type RESTConfig = {
8877
8744
  endpoint?: string;
8878
8745
  prettyPrintJson?: boolean;
@@ -10321,25 +10188,6 @@ declare namespace CodeceptJS {
10321
10188
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
10322
10189
  * @property [logLevel = silent] - level of logging verbosity. Default: silent. Options: trace | debug | info | warn | error | silent. More info: https://webdriver.io/docs/configuration/#loglevel
10323
10190
  */
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
10343
10191
  type WebDriverConfig = {
10344
10192
  url: string;
10345
10193
  browser: string;
@@ -12398,10 +12246,33 @@ declare namespace CodeceptJS {
12398
12246
  [key: string]: any;
12399
12247
  };
12400
12248
  }
12249
+ /**
12250
+ * Result of the test run
12251
+ */
12252
+ type Stats = {
12253
+ passes: number;
12254
+ failures: number;
12255
+ tests: number;
12256
+ pending: number;
12257
+ failedHooks: number;
12258
+ start: Date;
12259
+ end: Date;
12260
+ duration: number;
12261
+ };
12262
+ /**
12263
+ * Create Result of the test run
12264
+ */
12265
+ class Result {
12266
+ constructor();
12267
+ }
12401
12268
  /**
12402
12269
  * Dependency Injection Container
12403
12270
  */
12404
12271
  class Container {
12272
+ /**
12273
+ * Get the standard acting helpers of CodeceptJS Container
12274
+ */
12275
+ static STANDARD_ACTING_HELPERS: any;
12405
12276
  /**
12406
12277
  * Create container with all required helpers and support objects
12407
12278
  */
@@ -12426,6 +12297,10 @@ declare namespace CodeceptJS {
12426
12297
  * Get Mocha instance
12427
12298
  */
12428
12299
  static mocha(): any;
12300
+ /**
12301
+ * Get result
12302
+ */
12303
+ static result(): Result;
12429
12304
  /**
12430
12305
  * Append new services to container
12431
12306
  */
@@ -12845,6 +12720,7 @@ declare namespace CodeceptJS {
12845
12720
  var onPause: boolean;
12846
12721
  var currentTest: CodeceptJS.Test | null;
12847
12722
  var currentStep: any;
12723
+ var currentSuite: CodeceptJS.Suite | null;
12848
12724
  }
12849
12725
  /**
12850
12726
  * Describe a "suite" with the given `title`
@@ -12944,6 +12820,46 @@ declare namespace CodeceptJS {
12944
12820
  }): this;
12945
12821
  }
12946
12822
  function addStep(step: any, fn: any): void;
12823
+ /**
12824
+ * Creates a new Hook instance
12825
+ * @property suite - The test suite this hook belongs to
12826
+ * @property test - The test object associated with this hook
12827
+ * @property runnable - The current test being executed
12828
+ * @property ctx - The context object
12829
+ * @property err - The error that occurred during hook execution, if any
12830
+ * @param context - The context object containing suite and test information
12831
+ * @param context.suite - The test suite
12832
+ * @param context.test - The test object
12833
+ * @param context.ctx - The context object
12834
+ * @param error - The error object if hook execution failed
12835
+ */
12836
+ class Hook {
12837
+ constructor(context: {
12838
+ suite: any;
12839
+ test: any;
12840
+ ctx: any;
12841
+ }, error: Error);
12842
+ /**
12843
+ * The test suite this hook belongs to
12844
+ */
12845
+ suite: any;
12846
+ /**
12847
+ * The test object associated with this hook
12848
+ */
12849
+ test: any;
12850
+ /**
12851
+ * The current test being executed
12852
+ */
12853
+ runnable: any;
12854
+ /**
12855
+ * The context object
12856
+ */
12857
+ ctx: any;
12858
+ /**
12859
+ * The error that occurred during hook execution, if any
12860
+ */
12861
+ err: Error | null;
12862
+ }
12947
12863
  function within(context: CodeceptJS.LocatorOrString, fn: (...params: any[]) => any): Promise<any> | undefined;
12948
12864
  /**
12949
12865
  * This is a wrapper on top of [Detox](https://github.com/wix/Detox) library, aimied to unify testing experience for CodeceptJS framework.
@@ -13554,3 +13470,8 @@ declare var helper: CodeceptJS.Helper;
13554
13470
  */
13555
13471
  declare var helperMethod: string;
13556
13472
 
13473
+ /**
13474
+ * hide children steps from output
13475
+ */
13476
+ declare var collsapsed: boolean;
13477
+