codeceptjs 3.7.2 → 3.7.4
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/bin/codecept.js +1 -0
- package/lib/codecept.js +5 -0
- package/lib/command/info.js +41 -5
- package/lib/container.js +30 -4
- package/lib/helper/Appium.js +3 -1
- package/lib/helper/Mochawesome.js +8 -8
- package/lib/helper/Playwright.js +26 -9
- package/lib/mocha/asyncWrapper.js +13 -3
- package/lib/mocha/gherkin.js +1 -1
- package/lib/mocha/test.js +12 -1
- package/lib/pause.js +6 -1
- package/lib/plugin/commentStep.js +1 -1
- package/lib/plugin/screenshotOnFail.js +1 -9
- package/lib/workerStorage.js +2 -1
- package/package.json +44 -42
- package/typings/promiseBasedTypes.d.ts +0 -688
- package/typings/types.d.ts +57 -691
|
@@ -1179,228 +1179,6 @@ declare namespace CodeceptJS {
|
|
|
1179
1179
|
*/
|
|
1180
1180
|
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
1181
1181
|
}
|
|
1182
|
-
/**
|
|
1183
|
-
* This helper allows performing assertions based on Chai.
|
|
1184
|
-
*
|
|
1185
|
-
* ### Examples
|
|
1186
|
-
*
|
|
1187
|
-
* Zero-configuration when paired with other helpers like REST, Playwright:
|
|
1188
|
-
*
|
|
1189
|
-
* ```js
|
|
1190
|
-
* // inside codecept.conf.js
|
|
1191
|
-
* {
|
|
1192
|
-
* helpers: {
|
|
1193
|
-
* Playwright: {...},
|
|
1194
|
-
* ExpectHelper: {},
|
|
1195
|
-
* }
|
|
1196
|
-
* }
|
|
1197
|
-
* ```
|
|
1198
|
-
*
|
|
1199
|
-
* ## Methods
|
|
1200
|
-
*/
|
|
1201
|
-
class ExpectHelper {
|
|
1202
|
-
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1203
|
-
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1204
|
-
expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1205
|
-
expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1206
|
-
expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): Promise<any>;
|
|
1207
|
-
expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): Promise<any>;
|
|
1208
|
-
expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): Promise<any>;
|
|
1209
|
-
expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): Promise<any>;
|
|
1210
|
-
expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): Promise<any>;
|
|
1211
|
-
expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): Promise<any>;
|
|
1212
|
-
expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): Promise<any>;
|
|
1213
|
-
/**
|
|
1214
|
-
* @param [ajvOptions] - Pass AJV options
|
|
1215
|
-
*/
|
|
1216
|
-
expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): Promise<any>;
|
|
1217
|
-
expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): Promise<any>;
|
|
1218
|
-
expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): Promise<any>;
|
|
1219
|
-
expectToBeA(targetData: any, type: any, customErrorMsg?: any): Promise<any>;
|
|
1220
|
-
expectToBeAn(targetData: any, type: any, customErrorMsg?: any): Promise<any>;
|
|
1221
|
-
expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): Promise<any>;
|
|
1222
|
-
expectLengthOf(targetData: any, length: any, customErrorMsg?: any): Promise<any>;
|
|
1223
|
-
expectEmpty(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1224
|
-
expectTrue(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1225
|
-
expectFalse(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1226
|
-
expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): Promise<any>;
|
|
1227
|
-
expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): Promise<any>;
|
|
1228
|
-
expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): Promise<any>;
|
|
1229
|
-
expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): Promise<any>;
|
|
1230
|
-
expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1231
|
-
/**
|
|
1232
|
-
* expects members of two arrays are deeply equal
|
|
1233
|
-
*/
|
|
1234
|
-
expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1235
|
-
/**
|
|
1236
|
-
* expects an array to be a superset of another array
|
|
1237
|
-
*/
|
|
1238
|
-
expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): Promise<any>;
|
|
1239
|
-
/**
|
|
1240
|
-
* expects members of two JSON objects are deeply equal excluding some properties
|
|
1241
|
-
*/
|
|
1242
|
-
expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): Promise<any>;
|
|
1243
|
-
/**
|
|
1244
|
-
* expects a JSON object matches a provided pattern
|
|
1245
|
-
*/
|
|
1246
|
-
expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): Promise<any>;
|
|
1247
|
-
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1248
|
-
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1249
|
-
expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1250
|
-
expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1251
|
-
expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): Promise<any>;
|
|
1252
|
-
expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): Promise<any>;
|
|
1253
|
-
expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): Promise<any>;
|
|
1254
|
-
expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): Promise<any>;
|
|
1255
|
-
expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): Promise<any>;
|
|
1256
|
-
expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): Promise<any>;
|
|
1257
|
-
expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): Promise<any>;
|
|
1258
|
-
/**
|
|
1259
|
-
* @param [ajvOptions] - Pass AJV options
|
|
1260
|
-
*/
|
|
1261
|
-
expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): Promise<any>;
|
|
1262
|
-
expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): Promise<any>;
|
|
1263
|
-
expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): Promise<any>;
|
|
1264
|
-
expectToBeA(targetData: any, type: any, customErrorMsg?: any): Promise<any>;
|
|
1265
|
-
expectToBeAn(targetData: any, type: any, customErrorMsg?: any): Promise<any>;
|
|
1266
|
-
expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): Promise<any>;
|
|
1267
|
-
expectLengthOf(targetData: any, length: any, customErrorMsg?: any): Promise<any>;
|
|
1268
|
-
expectEmpty(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1269
|
-
expectTrue(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1270
|
-
expectFalse(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1271
|
-
expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): Promise<any>;
|
|
1272
|
-
expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): Promise<any>;
|
|
1273
|
-
expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): Promise<any>;
|
|
1274
|
-
expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): Promise<any>;
|
|
1275
|
-
expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1276
|
-
/**
|
|
1277
|
-
* expects members of two arrays are deeply equal
|
|
1278
|
-
*/
|
|
1279
|
-
expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1280
|
-
/**
|
|
1281
|
-
* expects an array to be a superset of another array
|
|
1282
|
-
*/
|
|
1283
|
-
expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): Promise<any>;
|
|
1284
|
-
/**
|
|
1285
|
-
* expects members of two JSON objects are deeply equal excluding some properties
|
|
1286
|
-
*/
|
|
1287
|
-
expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): Promise<any>;
|
|
1288
|
-
/**
|
|
1289
|
-
* expects a JSON object matches a provided pattern
|
|
1290
|
-
*/
|
|
1291
|
-
expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): Promise<any>;
|
|
1292
|
-
}
|
|
1293
|
-
/**
|
|
1294
|
-
* This helper allows performing assertions based on Chai.
|
|
1295
|
-
*
|
|
1296
|
-
* ### Examples
|
|
1297
|
-
*
|
|
1298
|
-
* Zero-configuration when paired with other helpers like REST, Playwright:
|
|
1299
|
-
*
|
|
1300
|
-
* ```js
|
|
1301
|
-
* // inside codecept.conf.js
|
|
1302
|
-
* {
|
|
1303
|
-
* helpers: {
|
|
1304
|
-
* Playwright: {...},
|
|
1305
|
-
* ExpectHelper: {},
|
|
1306
|
-
* }
|
|
1307
|
-
* }
|
|
1308
|
-
* ```
|
|
1309
|
-
*
|
|
1310
|
-
* ## Methods
|
|
1311
|
-
*/
|
|
1312
|
-
class ExpectHelper {
|
|
1313
|
-
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1314
|
-
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1315
|
-
expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1316
|
-
expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1317
|
-
expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): Promise<any>;
|
|
1318
|
-
expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): Promise<any>;
|
|
1319
|
-
expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): Promise<any>;
|
|
1320
|
-
expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): Promise<any>;
|
|
1321
|
-
expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): Promise<any>;
|
|
1322
|
-
expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): Promise<any>;
|
|
1323
|
-
expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): Promise<any>;
|
|
1324
|
-
/**
|
|
1325
|
-
* @param [ajvOptions] - Pass AJV options
|
|
1326
|
-
*/
|
|
1327
|
-
expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): Promise<any>;
|
|
1328
|
-
expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): Promise<any>;
|
|
1329
|
-
expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): Promise<any>;
|
|
1330
|
-
expectToBeA(targetData: any, type: any, customErrorMsg?: any): Promise<any>;
|
|
1331
|
-
expectToBeAn(targetData: any, type: any, customErrorMsg?: any): Promise<any>;
|
|
1332
|
-
expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): Promise<any>;
|
|
1333
|
-
expectLengthOf(targetData: any, length: any, customErrorMsg?: any): Promise<any>;
|
|
1334
|
-
expectEmpty(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1335
|
-
expectTrue(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1336
|
-
expectFalse(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1337
|
-
expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): Promise<any>;
|
|
1338
|
-
expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): Promise<any>;
|
|
1339
|
-
expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): Promise<any>;
|
|
1340
|
-
expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): Promise<any>;
|
|
1341
|
-
expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1342
|
-
/**
|
|
1343
|
-
* expects members of two arrays are deeply equal
|
|
1344
|
-
*/
|
|
1345
|
-
expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1346
|
-
/**
|
|
1347
|
-
* expects an array to be a superset of another array
|
|
1348
|
-
*/
|
|
1349
|
-
expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): Promise<any>;
|
|
1350
|
-
/**
|
|
1351
|
-
* expects members of two JSON objects are deeply equal excluding some properties
|
|
1352
|
-
*/
|
|
1353
|
-
expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): Promise<any>;
|
|
1354
|
-
/**
|
|
1355
|
-
* expects a JSON object matches a provided pattern
|
|
1356
|
-
*/
|
|
1357
|
-
expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): Promise<any>;
|
|
1358
|
-
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1359
|
-
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1360
|
-
expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1361
|
-
expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1362
|
-
expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): Promise<any>;
|
|
1363
|
-
expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): Promise<any>;
|
|
1364
|
-
expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): Promise<any>;
|
|
1365
|
-
expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): Promise<any>;
|
|
1366
|
-
expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): Promise<any>;
|
|
1367
|
-
expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): Promise<any>;
|
|
1368
|
-
expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): Promise<any>;
|
|
1369
|
-
/**
|
|
1370
|
-
* @param [ajvOptions] - Pass AJV options
|
|
1371
|
-
*/
|
|
1372
|
-
expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): Promise<any>;
|
|
1373
|
-
expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): Promise<any>;
|
|
1374
|
-
expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): Promise<any>;
|
|
1375
|
-
expectToBeA(targetData: any, type: any, customErrorMsg?: any): Promise<any>;
|
|
1376
|
-
expectToBeAn(targetData: any, type: any, customErrorMsg?: any): Promise<any>;
|
|
1377
|
-
expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): Promise<any>;
|
|
1378
|
-
expectLengthOf(targetData: any, length: any, customErrorMsg?: any): Promise<any>;
|
|
1379
|
-
expectEmpty(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1380
|
-
expectTrue(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1381
|
-
expectFalse(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1382
|
-
expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): Promise<any>;
|
|
1383
|
-
expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): Promise<any>;
|
|
1384
|
-
expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): Promise<any>;
|
|
1385
|
-
expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): Promise<any>;
|
|
1386
|
-
expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1387
|
-
/**
|
|
1388
|
-
* expects members of two arrays are deeply equal
|
|
1389
|
-
*/
|
|
1390
|
-
expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1391
|
-
/**
|
|
1392
|
-
* expects an array to be a superset of another array
|
|
1393
|
-
*/
|
|
1394
|
-
expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): Promise<any>;
|
|
1395
|
-
/**
|
|
1396
|
-
* expects members of two JSON objects are deeply equal excluding some properties
|
|
1397
|
-
*/
|
|
1398
|
-
expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): Promise<any>;
|
|
1399
|
-
/**
|
|
1400
|
-
* expects a JSON object matches a provided pattern
|
|
1401
|
-
*/
|
|
1402
|
-
expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): Promise<any>;
|
|
1403
|
-
}
|
|
1404
1182
|
/**
|
|
1405
1183
|
* Helper for testing filesystem.
|
|
1406
1184
|
* Can be easily used to check file structures:
|
|
@@ -1973,188 +1751,6 @@ declare namespace CodeceptJS {
|
|
|
1973
1751
|
*/
|
|
1974
1752
|
seeResponseMatchesJsonSchema(fnOrSchema: any): Promise<any>;
|
|
1975
1753
|
}
|
|
1976
|
-
/**
|
|
1977
|
-
* ## Configuration
|
|
1978
|
-
*
|
|
1979
|
-
* This helper should be configured in codecept.conf.(js|ts)
|
|
1980
|
-
* @property [port = 9393] - Mock server port
|
|
1981
|
-
* @property [host = "0.0.0.0"] - Mock server host
|
|
1982
|
-
* @property [httpsOpts] - key & cert values are the paths to .key and .crt files
|
|
1983
|
-
*/
|
|
1984
|
-
type MockServerConfig = {
|
|
1985
|
-
port?: number;
|
|
1986
|
-
host?: string;
|
|
1987
|
-
httpsOpts?: any;
|
|
1988
|
-
};
|
|
1989
|
-
/**
|
|
1990
|
-
* MockServer
|
|
1991
|
-
*
|
|
1992
|
-
* The MockServer Helper in CodeceptJS empowers you to mock any server or service via HTTP or HTTPS, making it an excellent tool for simulating REST endpoints and other HTTP-based APIs.
|
|
1993
|
-
*
|
|
1994
|
-
* <!-- configuration -->
|
|
1995
|
-
*
|
|
1996
|
-
* #### Examples
|
|
1997
|
-
*
|
|
1998
|
-
* You can seamlessly integrate MockServer with other helpers like REST or Playwright. Here's a configuration example inside the `codecept.conf.js` file:
|
|
1999
|
-
*
|
|
2000
|
-
* ```javascript
|
|
2001
|
-
* {
|
|
2002
|
-
* helpers: {
|
|
2003
|
-
* REST: {...},
|
|
2004
|
-
* MockServer: {
|
|
2005
|
-
* // default mock server config
|
|
2006
|
-
* port: 9393,
|
|
2007
|
-
* host: '0.0.0.0',
|
|
2008
|
-
* httpsOpts: {
|
|
2009
|
-
* key: '',
|
|
2010
|
-
* cert: '',
|
|
2011
|
-
* },
|
|
2012
|
-
* },
|
|
2013
|
-
* }
|
|
2014
|
-
* }
|
|
2015
|
-
* ```
|
|
2016
|
-
*
|
|
2017
|
-
* #### Adding Interactions
|
|
2018
|
-
*
|
|
2019
|
-
* Interactions add behavior to the mock server. Use the `I.addInteractionToMockServer()` method to include interactions. It takes an interaction object as an argument, containing request and response details.
|
|
2020
|
-
*
|
|
2021
|
-
* ```javascript
|
|
2022
|
-
* I.addInteractionToMockServer({
|
|
2023
|
-
* request: {
|
|
2024
|
-
* method: 'GET',
|
|
2025
|
-
* path: '/api/hello'
|
|
2026
|
-
* },
|
|
2027
|
-
* response: {
|
|
2028
|
-
* status: 200,
|
|
2029
|
-
* body: {
|
|
2030
|
-
* 'say': 'hello to mock server'
|
|
2031
|
-
* }
|
|
2032
|
-
* }
|
|
2033
|
-
* });
|
|
2034
|
-
* ```
|
|
2035
|
-
*
|
|
2036
|
-
* #### Request Matching
|
|
2037
|
-
*
|
|
2038
|
-
* When a real request is sent to the mock server, it matches the received request with the interactions. If a match is found, it returns the specified response; otherwise, a 404 status code is returned.
|
|
2039
|
-
*
|
|
2040
|
-
* - Strong match on HTTP Method, Path, Query Params & JSON body.
|
|
2041
|
-
* - Loose match on Headers.
|
|
2042
|
-
*
|
|
2043
|
-
* ##### Strong Match on Query Params
|
|
2044
|
-
*
|
|
2045
|
-
* You can send different responses based on query parameters:
|
|
2046
|
-
*
|
|
2047
|
-
* ```javascript
|
|
2048
|
-
* I.addInteractionToMockServer({
|
|
2049
|
-
* request: {
|
|
2050
|
-
* method: 'GET',
|
|
2051
|
-
* path: '/api/users',
|
|
2052
|
-
* queryParams: {
|
|
2053
|
-
* id: 1
|
|
2054
|
-
* }
|
|
2055
|
-
* },
|
|
2056
|
-
* response: {
|
|
2057
|
-
* status: 200,
|
|
2058
|
-
* body: 'user 1'
|
|
2059
|
-
* }
|
|
2060
|
-
* });
|
|
2061
|
-
*
|
|
2062
|
-
* I.addInteractionToMockServer({
|
|
2063
|
-
* request: {
|
|
2064
|
-
* method: 'GET',
|
|
2065
|
-
* path: '/api/users',
|
|
2066
|
-
* queryParams: {
|
|
2067
|
-
* id: 2
|
|
2068
|
-
* }
|
|
2069
|
-
* },
|
|
2070
|
-
* response: {
|
|
2071
|
-
* status: 200,
|
|
2072
|
-
* body: 'user 2'
|
|
2073
|
-
* }
|
|
2074
|
-
* });
|
|
2075
|
-
* ```
|
|
2076
|
-
*
|
|
2077
|
-
* - GET to `/api/users?id=1` will return 'user 1'.
|
|
2078
|
-
* - GET to `/api/users?id=2` will return 'user 2'.
|
|
2079
|
-
* - For all other requests, it returns a 404 status code.
|
|
2080
|
-
*
|
|
2081
|
-
* ##### Loose Match on Body
|
|
2082
|
-
*
|
|
2083
|
-
* When `strict` is set to false, it performs a loose match on query params and response body:
|
|
2084
|
-
*
|
|
2085
|
-
* ```javascript
|
|
2086
|
-
* I.addInteractionToMockServer({
|
|
2087
|
-
* strict: false,
|
|
2088
|
-
* request: {
|
|
2089
|
-
* method: 'POST',
|
|
2090
|
-
* path: '/api/users',
|
|
2091
|
-
* body: {
|
|
2092
|
-
* name: 'john'
|
|
2093
|
-
* }
|
|
2094
|
-
* },
|
|
2095
|
-
* response: {
|
|
2096
|
-
* status: 200
|
|
2097
|
-
* }
|
|
2098
|
-
* });
|
|
2099
|
-
* ```
|
|
2100
|
-
*
|
|
2101
|
-
* - POST to `/api/users` with the body containing `name` as 'john' will return a 200 status code.
|
|
2102
|
-
* - POST to `/api/users` without the `name` property in the body will return a 404 status code.
|
|
2103
|
-
*
|
|
2104
|
-
* Happy testing with MockServer in CodeceptJS! 🚀
|
|
2105
|
-
*
|
|
2106
|
-
* ## Methods
|
|
2107
|
-
*/
|
|
2108
|
-
class MockServer {
|
|
2109
|
-
/**
|
|
2110
|
-
* Start the mock server
|
|
2111
|
-
* @param [port] - start the mock server with given port
|
|
2112
|
-
*/
|
|
2113
|
-
startMockServer(port?: number): Promise<any>;
|
|
2114
|
-
/**
|
|
2115
|
-
* Stop the mock server
|
|
2116
|
-
*/
|
|
2117
|
-
stopMockServer(): Promise<any>;
|
|
2118
|
-
/**
|
|
2119
|
-
* An interaction adds behavior to the mock server
|
|
2120
|
-
*
|
|
2121
|
-
*
|
|
2122
|
-
* ```js
|
|
2123
|
-
* I.addInteractionToMockServer({
|
|
2124
|
-
* request: {
|
|
2125
|
-
* method: 'GET',
|
|
2126
|
-
* path: '/api/hello'
|
|
2127
|
-
* },
|
|
2128
|
-
* response: {
|
|
2129
|
-
* status: 200,
|
|
2130
|
-
* body: {
|
|
2131
|
-
* 'say': 'hello to mock server'
|
|
2132
|
-
* }
|
|
2133
|
-
* }
|
|
2134
|
-
* });
|
|
2135
|
-
* ```
|
|
2136
|
-
* ```js
|
|
2137
|
-
* // with query params
|
|
2138
|
-
* I.addInteractionToMockServer({
|
|
2139
|
-
* request: {
|
|
2140
|
-
* method: 'GET',
|
|
2141
|
-
* path: '/api/hello',
|
|
2142
|
-
* queryParams: {
|
|
2143
|
-
* id: 2
|
|
2144
|
-
* }
|
|
2145
|
-
* },
|
|
2146
|
-
* response: {
|
|
2147
|
-
* status: 200,
|
|
2148
|
-
* body: {
|
|
2149
|
-
* 'say': 'hello to mock server'
|
|
2150
|
-
* }
|
|
2151
|
-
* }
|
|
2152
|
-
* });
|
|
2153
|
-
* ```
|
|
2154
|
-
* @param interaction - add behavior to the mock server
|
|
2155
|
-
*/
|
|
2156
|
-
addInteractionToMockServer(interaction: CodeceptJS.MockInteraction | any): Promise<any>;
|
|
2157
|
-
}
|
|
2158
1754
|
/**
|
|
2159
1755
|
* Nightmare helper wraps [Nightmare](https://github.com/segmentio/nightmare) library to provide
|
|
2160
1756
|
* fastest headless testing using Electron engine. Unlike Selenium-based drivers this uses
|
|
@@ -3094,46 +2690,6 @@ declare namespace CodeceptJS {
|
|
|
3094
2690
|
*/
|
|
3095
2691
|
grabPageScrollPosition(): Promise<PageScrollPosition>;
|
|
3096
2692
|
}
|
|
3097
|
-
/**
|
|
3098
|
-
* OpenAI Helper for CodeceptJS.
|
|
3099
|
-
*
|
|
3100
|
-
* This helper class provides integration with the OpenAI GPT-3.5 or 4 language model for generating responses to questions or prompts within the context of web pages. It allows you to interact with the GPT-3.5 model to obtain intelligent responses based on HTML fragments or general prompts.
|
|
3101
|
-
* This helper should be enabled with any web helpers like Playwright or Puppeteer or WebDrvier to ensure the HTML context is available.
|
|
3102
|
-
*
|
|
3103
|
-
* ## Configuration
|
|
3104
|
-
*
|
|
3105
|
-
* This helper should be configured in codecept.json or codecept.conf.js
|
|
3106
|
-
*
|
|
3107
|
-
* * `chunkSize`: (optional, default: 80000) - The maximum number of characters to send to the OpenAI API at once. We split HTML fragments by 8000 chars to not exceed token limit. Increase this value if you use GPT-4.
|
|
3108
|
-
*/
|
|
3109
|
-
class OpenAITs {
|
|
3110
|
-
/**
|
|
3111
|
-
* Asks the OpenAI GPT language model a question based on the provided prompt within the context of the current page's HTML.
|
|
3112
|
-
*
|
|
3113
|
-
* ```js
|
|
3114
|
-
* I.askGptOnPage('what does this page do?');
|
|
3115
|
-
* ```
|
|
3116
|
-
* @param prompt - The question or prompt to ask the GPT model.
|
|
3117
|
-
* @returns - A Promise that resolves to the generated responses from the GPT model, joined by newlines.
|
|
3118
|
-
*/
|
|
3119
|
-
askGptOnPage(prompt: string): Promise<string>;
|
|
3120
|
-
/**
|
|
3121
|
-
* Asks the OpenAI GPT-3.5 language model a question based on the provided prompt within the context of a specific HTML fragment on the current page.
|
|
3122
|
-
*
|
|
3123
|
-
* ```js
|
|
3124
|
-
* I.askGptOnPageFragment('describe features of this screen', '.screen');
|
|
3125
|
-
* ```
|
|
3126
|
-
* @param prompt - The question or prompt to ask the GPT-3.5 model.
|
|
3127
|
-
* @param locator - The locator or selector used to identify the HTML fragment on the page.
|
|
3128
|
-
* @returns - A Promise that resolves to the generated response from the GPT model.
|
|
3129
|
-
*/
|
|
3130
|
-
askGptOnPageFragment(prompt: string, locator: string): Promise<string>;
|
|
3131
|
-
/**
|
|
3132
|
-
* Send a general request to ChatGPT and return response.
|
|
3133
|
-
* @returns - A Promise that resolves to the generated response from the GPT model.
|
|
3134
|
-
*/
|
|
3135
|
-
askGptGeneralPrompt(prompt: string): Promise<string>;
|
|
3136
|
-
}
|
|
3137
2693
|
/**
|
|
3138
2694
|
* ## Configuration
|
|
3139
2695
|
*
|
|
@@ -8552,250 +8108,6 @@ declare namespace CodeceptJS {
|
|
|
8552
8108
|
*/
|
|
8553
8109
|
sendDeleteRequestWithPayload(url: any, payload?: any, headers?: any): Promise<any>;
|
|
8554
8110
|
}
|
|
8555
|
-
/**
|
|
8556
|
-
* SoftAssertHelper is a utility class for performing soft assertions.
|
|
8557
|
-
* Unlike traditional assertions that stop the execution on failure,
|
|
8558
|
-
* soft assertions allow the execution to continue and report all failures at the end.
|
|
8559
|
-
*
|
|
8560
|
-
* ### Examples
|
|
8561
|
-
*
|
|
8562
|
-
* Zero-configuration when paired with other helpers like REST, Playwright:
|
|
8563
|
-
*
|
|
8564
|
-
* ```js
|
|
8565
|
-
* // inside codecept.conf.js
|
|
8566
|
-
* {
|
|
8567
|
-
* helpers: {
|
|
8568
|
-
* Playwright: {...},
|
|
8569
|
-
* SoftExpectHelper: {},
|
|
8570
|
-
* }
|
|
8571
|
-
* }
|
|
8572
|
-
* ```
|
|
8573
|
-
*
|
|
8574
|
-
* ```js
|
|
8575
|
-
* // in scenario
|
|
8576
|
-
* I.softExpectEqual('a', 'b')
|
|
8577
|
-
* I.flushSoftAssertions() // Throws an error if any soft assertions have failed. The error message contains all the accumulated failures.
|
|
8578
|
-
* ```
|
|
8579
|
-
*
|
|
8580
|
-
* ## Methods
|
|
8581
|
-
*/
|
|
8582
|
-
class SoftAssertHelperTs {
|
|
8583
|
-
/**
|
|
8584
|
-
* Performs a soft assertion by executing the provided assertion function.
|
|
8585
|
-
* If the assertion fails, the error is caught and stored without halting the execution.
|
|
8586
|
-
* @param assertionFn - The assertion function to execute.
|
|
8587
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8588
|
-
*/
|
|
8589
|
-
softAssert(assertionFn: (...params: any[]) => any, customErrorMsg?: string): Promise<any>;
|
|
8590
|
-
/**
|
|
8591
|
-
* Throws an error if any soft assertions have failed.
|
|
8592
|
-
* The error message contains all the accumulated failures.
|
|
8593
|
-
*/
|
|
8594
|
-
flushSoftAssertions(): Promise<any>;
|
|
8595
|
-
/**
|
|
8596
|
-
* Softly asserts that two values are equal.
|
|
8597
|
-
* @param actualValue - The actual value.
|
|
8598
|
-
* @param expectedValue - The expected value.
|
|
8599
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8600
|
-
*/
|
|
8601
|
-
softExpectEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): Promise<any>;
|
|
8602
|
-
/**
|
|
8603
|
-
* Softly asserts that two values are not equal.
|
|
8604
|
-
* @param actualValue - The actual value.
|
|
8605
|
-
* @param expectedValue - The expected value.
|
|
8606
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8607
|
-
*/
|
|
8608
|
-
softExpectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): Promise<any>;
|
|
8609
|
-
/**
|
|
8610
|
-
* Softly asserts that two values are deeply equal.
|
|
8611
|
-
* @param actualValue - The actual value.
|
|
8612
|
-
* @param expectedValue - The expected value.
|
|
8613
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8614
|
-
*/
|
|
8615
|
-
softExpectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): Promise<any>;
|
|
8616
|
-
/**
|
|
8617
|
-
* Softly asserts that two values are not deeply equal.
|
|
8618
|
-
* @param actualValue - The actual value.
|
|
8619
|
-
* @param expectedValue - The expected value.
|
|
8620
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8621
|
-
*/
|
|
8622
|
-
softExpectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): Promise<any>;
|
|
8623
|
-
/**
|
|
8624
|
-
* Softly asserts that a value contains the expected value.
|
|
8625
|
-
* @param actualValue - The actual value.
|
|
8626
|
-
* @param expectedValueToContain - The value that should be contained within the actual value.
|
|
8627
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8628
|
-
*/
|
|
8629
|
-
softExpectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: string): Promise<any>;
|
|
8630
|
-
/**
|
|
8631
|
-
* Softly asserts that a value does not contain the expected value.
|
|
8632
|
-
* @param actualValue - The actual value.
|
|
8633
|
-
* @param expectedValueToNotContain - The value that should not be contained within the actual value.
|
|
8634
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8635
|
-
*/
|
|
8636
|
-
softExpectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: string): Promise<any>;
|
|
8637
|
-
/**
|
|
8638
|
-
* Softly asserts that a value starts with the expected value.
|
|
8639
|
-
* @param actualValue - The actual value.
|
|
8640
|
-
* @param expectedValueToStartWith - The value that the actual value should start with.
|
|
8641
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8642
|
-
*/
|
|
8643
|
-
softExpectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: string): Promise<any>;
|
|
8644
|
-
/**
|
|
8645
|
-
* Softly asserts that a value does not start with the expected value.
|
|
8646
|
-
* @param actualValue - The actual value.
|
|
8647
|
-
* @param expectedValueToNotStartWith - The value that the actual value should not start with.
|
|
8648
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8649
|
-
*/
|
|
8650
|
-
softExpectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: string): Promise<any>;
|
|
8651
|
-
/**
|
|
8652
|
-
* Softly asserts that a value ends with the expected value.
|
|
8653
|
-
* @param actualValue - The actual value.
|
|
8654
|
-
* @param expectedValueToEndWith - The value that the actual value should end with.
|
|
8655
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8656
|
-
*/
|
|
8657
|
-
softExpectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: string): Promise<any>;
|
|
8658
|
-
/**
|
|
8659
|
-
* Softly asserts that a value does not end with the expected value.
|
|
8660
|
-
* @param actualValue - The actual value.
|
|
8661
|
-
* @param expectedValueToNotEndWith - The value that the actual value should not end with.
|
|
8662
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8663
|
-
*/
|
|
8664
|
-
softExpectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: string): Promise<any>;
|
|
8665
|
-
/**
|
|
8666
|
-
* Softly asserts that the target data matches the given JSON schema.
|
|
8667
|
-
* @param targetData - The data to validate.
|
|
8668
|
-
* @param jsonSchema - The JSON schema to validate against.
|
|
8669
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8670
|
-
*/
|
|
8671
|
-
softExpectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: string): Promise<any>;
|
|
8672
|
-
/**
|
|
8673
|
-
* Softly asserts that the target data matches the given JSON schema using AJV.
|
|
8674
|
-
* @param targetData - The data to validate.
|
|
8675
|
-
* @param jsonSchema - The JSON schema to validate against.
|
|
8676
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8677
|
-
* @param [ajvOptions = { allErrors: true }] - Options to pass to AJV.
|
|
8678
|
-
*/
|
|
8679
|
-
softExpectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: string, ajvOptions?: any): Promise<any>;
|
|
8680
|
-
/**
|
|
8681
|
-
* Softly asserts that the target data has the specified property.
|
|
8682
|
-
* @param targetData - The data to check.
|
|
8683
|
-
* @param propertyName - The property name to check for.
|
|
8684
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion
|
|
8685
|
-
* fails.
|
|
8686
|
-
*/
|
|
8687
|
-
softExpectHasProperty(targetData: any, propertyName: string, customErrorMsg?: string): Promise<any>;
|
|
8688
|
-
/**
|
|
8689
|
-
* Softly asserts that the target data has a property with the specified name.
|
|
8690
|
-
* @param targetData - The data to check.
|
|
8691
|
-
* @param propertyName - The property name to check for.
|
|
8692
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8693
|
-
*/
|
|
8694
|
-
softExpectHasAProperty(targetData: any, propertyName: string, customErrorMsg?: string): Promise<any>;
|
|
8695
|
-
/**
|
|
8696
|
-
* Softly asserts that the target data is of a specific type.
|
|
8697
|
-
* @param targetData - The data to check.
|
|
8698
|
-
* @param type - The expected type (e.g., 'string', 'number').
|
|
8699
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8700
|
-
*/
|
|
8701
|
-
softExpectToBeA(targetData: any, type: string, customErrorMsg?: string): Promise<any>;
|
|
8702
|
-
/**
|
|
8703
|
-
* Softly asserts that the target data is of a specific type (alternative for articles).
|
|
8704
|
-
* @param targetData - The data to check.
|
|
8705
|
-
* @param type - The expected type (e.g., 'string', 'number').
|
|
8706
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8707
|
-
*/
|
|
8708
|
-
softExpectToBeAn(targetData: any, type: string, customErrorMsg?: string): Promise<any>;
|
|
8709
|
-
/**
|
|
8710
|
-
* Softly asserts that the target data has a specified length.
|
|
8711
|
-
* @param targetData - The data to check.
|
|
8712
|
-
* @param length - The expected length.
|
|
8713
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8714
|
-
*/
|
|
8715
|
-
softExpectLengthOf(targetData: any, length: number, customErrorMsg?: string): Promise<any>;
|
|
8716
|
-
/**
|
|
8717
|
-
* Softly asserts that the target data is empty.
|
|
8718
|
-
* @param targetData - The data to check.
|
|
8719
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8720
|
-
*/
|
|
8721
|
-
softExpectEmpty(targetData: any, customErrorMsg?: string): Promise<any>;
|
|
8722
|
-
/**
|
|
8723
|
-
* Softly asserts that the target data is true.
|
|
8724
|
-
* @param targetData - The data to check.
|
|
8725
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8726
|
-
*/
|
|
8727
|
-
softExpectTrue(targetData: any, customErrorMsg?: string): Promise<any>;
|
|
8728
|
-
/**
|
|
8729
|
-
* Softly asserts that the target data is false.
|
|
8730
|
-
* @param targetData - The data to check.
|
|
8731
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8732
|
-
*/
|
|
8733
|
-
softExpectFalse(targetData: any, customErrorMsg?: string): Promise<any>;
|
|
8734
|
-
/**
|
|
8735
|
-
* Softly asserts that the target data is above a specified value.
|
|
8736
|
-
* @param targetData - The data to check.
|
|
8737
|
-
* @param aboveThan - The value that the target data should be above.
|
|
8738
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8739
|
-
*/
|
|
8740
|
-
softExpectAbove(targetData: any, aboveThan: any, customErrorMsg?: string): Promise<any>;
|
|
8741
|
-
/**
|
|
8742
|
-
* Softly asserts that the target data is below a specified value.
|
|
8743
|
-
* @param targetData - The data to check.
|
|
8744
|
-
* @param belowThan - The value that the target data should be below.
|
|
8745
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8746
|
-
*/
|
|
8747
|
-
softExpectBelow(targetData: any, belowThan: any, customErrorMsg?: string): Promise<any>;
|
|
8748
|
-
/**
|
|
8749
|
-
* Softly asserts that the length of the target data is above a specified value.
|
|
8750
|
-
* @param targetData - The data to check.
|
|
8751
|
-
* @param lengthAboveThan - The length that the target data should be above.
|
|
8752
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8753
|
-
*/
|
|
8754
|
-
softExpectLengthAboveThan(targetData: any, lengthAboveThan: number, customErrorMsg?: string): Promise<any>;
|
|
8755
|
-
/**
|
|
8756
|
-
* Softly asserts that the length of the target data is below a specified value.
|
|
8757
|
-
* @param targetData - The data to check.
|
|
8758
|
-
* @param lengthBelowThan - The length that the target data should be below.
|
|
8759
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8760
|
-
*/
|
|
8761
|
-
softExpectLengthBelowThan(targetData: any, lengthBelowThan: number, customErrorMsg?: string): Promise<any>;
|
|
8762
|
-
/**
|
|
8763
|
-
* Softly asserts that two values are equal, ignoring case.
|
|
8764
|
-
* @param actualValue - The actual string value.
|
|
8765
|
-
* @param expectedValue - The expected string value.
|
|
8766
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8767
|
-
*/
|
|
8768
|
-
softExpectEqualIgnoreCase(actualValue: string, expectedValue: string, customErrorMsg?: string): Promise<any>;
|
|
8769
|
-
/**
|
|
8770
|
-
* Softly asserts that two arrays have deep equality, considering members in any order.
|
|
8771
|
-
* @param actualValue - The actual array.
|
|
8772
|
-
* @param expectedValue - The expected array.
|
|
8773
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8774
|
-
*/
|
|
8775
|
-
softExpectDeepMembers(actualValue: any[], expectedValue: any[], customErrorMsg?: string): Promise<any>;
|
|
8776
|
-
/**
|
|
8777
|
-
* Softly asserts that an array (superset) deeply includes all members of another array (set).
|
|
8778
|
-
* @param superset - The array that should contain the expected members.
|
|
8779
|
-
* @param set - The array with members that should be included.
|
|
8780
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8781
|
-
*/
|
|
8782
|
-
softExpectDeepIncludeMembers(superset: any[], set: any[], customErrorMsg?: string): Promise<any>;
|
|
8783
|
-
/**
|
|
8784
|
-
* Softly asserts that two objects are deeply equal, excluding specified fields.
|
|
8785
|
-
* @param actualValue - The actual object.
|
|
8786
|
-
* @param expectedValue - The expected object.
|
|
8787
|
-
* @param fieldsToExclude - The fields to exclude from the comparison.
|
|
8788
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8789
|
-
*/
|
|
8790
|
-
softExpectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: string[], customErrorMsg?: string): Promise<any>;
|
|
8791
|
-
/**
|
|
8792
|
-
* Softly asserts that a value matches the expected pattern.
|
|
8793
|
-
* @param actualValue - The actual value.
|
|
8794
|
-
* @param expectedPattern - The pattern the value should match.
|
|
8795
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
8796
|
-
*/
|
|
8797
|
-
softExpectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: string): Promise<any>;
|
|
8798
|
-
}
|
|
8799
8111
|
/**
|
|
8800
8112
|
* Client Functions
|
|
8801
8113
|
*/
|