codeceptjs 3.7.0-beta.9 → 3.7.0-rc.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.
- package/lib/codecept.js +14 -12
- package/lib/command/check.js +11 -2
- package/lib/command/definitions.js +1 -1
- package/lib/command/gherkin/snippets.js +69 -69
- package/lib/command/interactive.js +1 -1
- package/lib/command/run-multiple/chunk.js +48 -45
- package/lib/container.js +14 -7
- package/lib/helper/AI.js +2 -1
- package/lib/mocha/asyncWrapper.js +3 -1
- package/lib/mocha/gherkin.js +1 -1
- package/lib/mocha/inject.js +5 -0
- package/lib/plugin/auth.js +435 -0
- package/lib/plugin/autoDelay.js +2 -2
- package/lib/plugin/autoLogin.js +3 -337
- package/lib/plugin/pageInfo.js +1 -1
- package/lib/plugin/retryTo.js +6 -17
- package/lib/plugin/screenshotOnFail.js +1 -1
- package/lib/plugin/standardActingHelpers.js +4 -1
- package/lib/plugin/stepByStepReport.js +1 -1
- package/lib/plugin/tryTo.js +6 -15
- package/lib/step/base.js +15 -4
- package/lib/step/comment.js +10 -0
- package/package.json +17 -17
- package/translations/de-DE.js +4 -3
- package/translations/fr-FR.js +4 -3
- package/translations/index.js +1 -0
- package/translations/it-IT.js +4 -3
- package/translations/ja-JP.js +4 -3
- package/translations/nl-NL.js +76 -0
- package/translations/pl-PL.js +4 -3
- package/translations/pt-BR.js +4 -3
- package/translations/ru-RU.js +4 -3
- package/translations/utils.js +9 -0
- package/translations/zh-CN.js +4 -3
- package/translations/zh-TW.js +4 -3
- package/typings/promiseBasedTypes.d.ts +0 -628
- package/typings/types.d.ts +73 -628
package/typings/types.d.ts
CHANGED
|
@@ -1203,266 +1203,6 @@ declare namespace CodeceptJS {
|
|
|
1203
1203
|
*/
|
|
1204
1204
|
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
|
|
1205
1205
|
}
|
|
1206
|
-
/**
|
|
1207
|
-
* This helper allows performing assertions based on Chai.
|
|
1208
|
-
*
|
|
1209
|
-
* ### Examples
|
|
1210
|
-
*
|
|
1211
|
-
* Zero-configuration when paired with other helpers like REST, Playwright:
|
|
1212
|
-
*
|
|
1213
|
-
* ```js
|
|
1214
|
-
* // inside codecept.conf.js
|
|
1215
|
-
* {
|
|
1216
|
-
* helpers: {
|
|
1217
|
-
* Playwright: {...},
|
|
1218
|
-
* ExpectHelper: {},
|
|
1219
|
-
* }
|
|
1220
|
-
* }
|
|
1221
|
-
* ```
|
|
1222
|
-
*
|
|
1223
|
-
* ## Methods
|
|
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
|
-
class ExpectHelper {
|
|
1245
|
-
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1246
|
-
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1247
|
-
expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1248
|
-
expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1249
|
-
expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): void;
|
|
1250
|
-
expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): void;
|
|
1251
|
-
expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): void;
|
|
1252
|
-
expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): void;
|
|
1253
|
-
expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): void;
|
|
1254
|
-
expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): void;
|
|
1255
|
-
expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): void;
|
|
1256
|
-
/**
|
|
1257
|
-
* @param [ajvOptions] - Pass AJV options
|
|
1258
|
-
*/
|
|
1259
|
-
expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): void;
|
|
1260
|
-
expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
|
|
1261
|
-
expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
|
|
1262
|
-
expectToBeA(targetData: any, type: any, customErrorMsg?: any): void;
|
|
1263
|
-
expectToBeAn(targetData: any, type: any, customErrorMsg?: any): void;
|
|
1264
|
-
expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): void;
|
|
1265
|
-
expectLengthOf(targetData: any, length: any, customErrorMsg?: any): void;
|
|
1266
|
-
expectEmpty(targetData: any, customErrorMsg?: any): void;
|
|
1267
|
-
expectTrue(targetData: any, customErrorMsg?: any): void;
|
|
1268
|
-
expectFalse(targetData: any, customErrorMsg?: any): void;
|
|
1269
|
-
expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): void;
|
|
1270
|
-
expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): void;
|
|
1271
|
-
expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): void;
|
|
1272
|
-
expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): void;
|
|
1273
|
-
expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1274
|
-
/**
|
|
1275
|
-
* expects members of two arrays are deeply equal
|
|
1276
|
-
*/
|
|
1277
|
-
expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1278
|
-
/**
|
|
1279
|
-
* expects an array to be a superset of another array
|
|
1280
|
-
*/
|
|
1281
|
-
expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): void;
|
|
1282
|
-
/**
|
|
1283
|
-
* expects members of two JSON objects are deeply equal excluding some properties
|
|
1284
|
-
*/
|
|
1285
|
-
expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): void;
|
|
1286
|
-
/**
|
|
1287
|
-
* expects a JSON object matches a provided pattern
|
|
1288
|
-
*/
|
|
1289
|
-
expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): void;
|
|
1290
|
-
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1291
|
-
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1292
|
-
expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1293
|
-
expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1294
|
-
expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): void;
|
|
1295
|
-
expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): void;
|
|
1296
|
-
expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): void;
|
|
1297
|
-
expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): void;
|
|
1298
|
-
expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): void;
|
|
1299
|
-
expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): void;
|
|
1300
|
-
expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): void;
|
|
1301
|
-
/**
|
|
1302
|
-
* @param [ajvOptions] - Pass AJV options
|
|
1303
|
-
*/
|
|
1304
|
-
expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): void;
|
|
1305
|
-
expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
|
|
1306
|
-
expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
|
|
1307
|
-
expectToBeA(targetData: any, type: any, customErrorMsg?: any): void;
|
|
1308
|
-
expectToBeAn(targetData: any, type: any, customErrorMsg?: any): void;
|
|
1309
|
-
expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): void;
|
|
1310
|
-
expectLengthOf(targetData: any, length: any, customErrorMsg?: any): void;
|
|
1311
|
-
expectEmpty(targetData: any, customErrorMsg?: any): void;
|
|
1312
|
-
expectTrue(targetData: any, customErrorMsg?: any): void;
|
|
1313
|
-
expectFalse(targetData: any, customErrorMsg?: any): void;
|
|
1314
|
-
expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): void;
|
|
1315
|
-
expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): void;
|
|
1316
|
-
expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): void;
|
|
1317
|
-
expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): void;
|
|
1318
|
-
expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1319
|
-
/**
|
|
1320
|
-
* expects members of two arrays are deeply equal
|
|
1321
|
-
*/
|
|
1322
|
-
expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1323
|
-
/**
|
|
1324
|
-
* expects an array to be a superset of another array
|
|
1325
|
-
*/
|
|
1326
|
-
expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): void;
|
|
1327
|
-
/**
|
|
1328
|
-
* expects members of two JSON objects are deeply equal excluding some properties
|
|
1329
|
-
*/
|
|
1330
|
-
expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): void;
|
|
1331
|
-
/**
|
|
1332
|
-
* expects a JSON object matches a provided pattern
|
|
1333
|
-
*/
|
|
1334
|
-
expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): void;
|
|
1335
|
-
}
|
|
1336
|
-
/**
|
|
1337
|
-
* This helper allows performing assertions based on Chai.
|
|
1338
|
-
*
|
|
1339
|
-
* ### Examples
|
|
1340
|
-
*
|
|
1341
|
-
* Zero-configuration when paired with other helpers like REST, Playwright:
|
|
1342
|
-
*
|
|
1343
|
-
* ```js
|
|
1344
|
-
* // inside codecept.conf.js
|
|
1345
|
-
* {
|
|
1346
|
-
* helpers: {
|
|
1347
|
-
* Playwright: {...},
|
|
1348
|
-
* ExpectHelper: {},
|
|
1349
|
-
* }
|
|
1350
|
-
* }
|
|
1351
|
-
* ```
|
|
1352
|
-
*
|
|
1353
|
-
* ## Methods
|
|
1354
|
-
*/
|
|
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
|
-
class ExpectHelper {
|
|
1375
|
-
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1376
|
-
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1377
|
-
expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1378
|
-
expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1379
|
-
expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): void;
|
|
1380
|
-
expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): void;
|
|
1381
|
-
expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): void;
|
|
1382
|
-
expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): void;
|
|
1383
|
-
expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): void;
|
|
1384
|
-
expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): void;
|
|
1385
|
-
expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): void;
|
|
1386
|
-
/**
|
|
1387
|
-
* @param [ajvOptions] - Pass AJV options
|
|
1388
|
-
*/
|
|
1389
|
-
expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): void;
|
|
1390
|
-
expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
|
|
1391
|
-
expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
|
|
1392
|
-
expectToBeA(targetData: any, type: any, customErrorMsg?: any): void;
|
|
1393
|
-
expectToBeAn(targetData: any, type: any, customErrorMsg?: any): void;
|
|
1394
|
-
expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): void;
|
|
1395
|
-
expectLengthOf(targetData: any, length: any, customErrorMsg?: any): void;
|
|
1396
|
-
expectEmpty(targetData: any, customErrorMsg?: any): void;
|
|
1397
|
-
expectTrue(targetData: any, customErrorMsg?: any): void;
|
|
1398
|
-
expectFalse(targetData: any, customErrorMsg?: any): void;
|
|
1399
|
-
expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): void;
|
|
1400
|
-
expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): void;
|
|
1401
|
-
expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): void;
|
|
1402
|
-
expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): void;
|
|
1403
|
-
expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1404
|
-
/**
|
|
1405
|
-
* expects members of two arrays are deeply equal
|
|
1406
|
-
*/
|
|
1407
|
-
expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1408
|
-
/**
|
|
1409
|
-
* expects an array to be a superset of another array
|
|
1410
|
-
*/
|
|
1411
|
-
expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): void;
|
|
1412
|
-
/**
|
|
1413
|
-
* expects members of two JSON objects are deeply equal excluding some properties
|
|
1414
|
-
*/
|
|
1415
|
-
expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): void;
|
|
1416
|
-
/**
|
|
1417
|
-
* expects a JSON object matches a provided pattern
|
|
1418
|
-
*/
|
|
1419
|
-
expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): void;
|
|
1420
|
-
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1421
|
-
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1422
|
-
expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1423
|
-
expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1424
|
-
expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): void;
|
|
1425
|
-
expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): void;
|
|
1426
|
-
expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): void;
|
|
1427
|
-
expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): void;
|
|
1428
|
-
expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): void;
|
|
1429
|
-
expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): void;
|
|
1430
|
-
expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): void;
|
|
1431
|
-
/**
|
|
1432
|
-
* @param [ajvOptions] - Pass AJV options
|
|
1433
|
-
*/
|
|
1434
|
-
expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions?: any): void;
|
|
1435
|
-
expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
|
|
1436
|
-
expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): void;
|
|
1437
|
-
expectToBeA(targetData: any, type: any, customErrorMsg?: any): void;
|
|
1438
|
-
expectToBeAn(targetData: any, type: any, customErrorMsg?: any): void;
|
|
1439
|
-
expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): void;
|
|
1440
|
-
expectLengthOf(targetData: any, length: any, customErrorMsg?: any): void;
|
|
1441
|
-
expectEmpty(targetData: any, customErrorMsg?: any): void;
|
|
1442
|
-
expectTrue(targetData: any, customErrorMsg?: any): void;
|
|
1443
|
-
expectFalse(targetData: any, customErrorMsg?: any): void;
|
|
1444
|
-
expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): void;
|
|
1445
|
-
expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): void;
|
|
1446
|
-
expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): void;
|
|
1447
|
-
expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): void;
|
|
1448
|
-
expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1449
|
-
/**
|
|
1450
|
-
* expects members of two arrays are deeply equal
|
|
1451
|
-
*/
|
|
1452
|
-
expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): void;
|
|
1453
|
-
/**
|
|
1454
|
-
* expects an array to be a superset of another array
|
|
1455
|
-
*/
|
|
1456
|
-
expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): void;
|
|
1457
|
-
/**
|
|
1458
|
-
* expects members of two JSON objects are deeply equal excluding some properties
|
|
1459
|
-
*/
|
|
1460
|
-
expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): void;
|
|
1461
|
-
/**
|
|
1462
|
-
* expects a JSON object matches a provided pattern
|
|
1463
|
-
*/
|
|
1464
|
-
expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): void;
|
|
1465
|
-
}
|
|
1466
1206
|
/**
|
|
1467
1207
|
* Helper for testing filesystem.
|
|
1468
1208
|
* Can be easily used to check file structures:
|
|
@@ -2051,20 +1791,6 @@ declare namespace CodeceptJS {
|
|
|
2051
1791
|
// @ts-ignore
|
|
2052
1792
|
// @ts-ignore
|
|
2053
1793
|
// @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
1794
|
type MockServerConfig = {
|
|
2069
1795
|
port?: number;
|
|
2070
1796
|
host?: string;
|
|
@@ -2194,20 +1920,6 @@ declare namespace CodeceptJS {
|
|
|
2194
1920
|
// @ts-ignore
|
|
2195
1921
|
// @ts-ignore
|
|
2196
1922
|
// @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
1923
|
class MockServer {
|
|
2212
1924
|
/**
|
|
2213
1925
|
* Start the mock server
|
|
@@ -3263,46 +2975,6 @@ declare namespace CodeceptJS {
|
|
|
3263
2975
|
*/
|
|
3264
2976
|
grabPageScrollPosition(): Promise<PageScrollPosition>;
|
|
3265
2977
|
}
|
|
3266
|
-
/**
|
|
3267
|
-
* OpenAI Helper for CodeceptJS.
|
|
3268
|
-
*
|
|
3269
|
-
* 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.
|
|
3270
|
-
* This helper should be enabled with any web helpers like Playwright or Puppeteer or WebDrvier to ensure the HTML context is available.
|
|
3271
|
-
*
|
|
3272
|
-
* ## Configuration
|
|
3273
|
-
*
|
|
3274
|
-
* This helper should be configured in codecept.json or codecept.conf.js
|
|
3275
|
-
*
|
|
3276
|
-
* * `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.
|
|
3277
|
-
*/
|
|
3278
|
-
class OpenAI {
|
|
3279
|
-
/**
|
|
3280
|
-
* Asks the OpenAI GPT language model a question based on the provided prompt within the context of the current page's HTML.
|
|
3281
|
-
*
|
|
3282
|
-
* ```js
|
|
3283
|
-
* I.askGptOnPage('what does this page do?');
|
|
3284
|
-
* ```
|
|
3285
|
-
* @param prompt - The question or prompt to ask the GPT model.
|
|
3286
|
-
* @returns - A Promise that resolves to the generated responses from the GPT model, joined by newlines.
|
|
3287
|
-
*/
|
|
3288
|
-
askGptOnPage(prompt: string): Promise<string>;
|
|
3289
|
-
/**
|
|
3290
|
-
* 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.
|
|
3291
|
-
*
|
|
3292
|
-
* ```js
|
|
3293
|
-
* I.askGptOnPageFragment('describe features of this screen', '.screen');
|
|
3294
|
-
* ```
|
|
3295
|
-
* @param prompt - The question or prompt to ask the GPT-3.5 model.
|
|
3296
|
-
* @param locator - The locator or selector used to identify the HTML fragment on the page.
|
|
3297
|
-
* @returns - A Promise that resolves to the generated response from the GPT model.
|
|
3298
|
-
*/
|
|
3299
|
-
askGptOnPageFragment(prompt: string, locator: string): Promise<string>;
|
|
3300
|
-
/**
|
|
3301
|
-
* Send a general request to ChatGPT and return response.
|
|
3302
|
-
* @returns - A Promise that resolves to the generated response from the GPT model.
|
|
3303
|
-
*/
|
|
3304
|
-
askGptGeneralPrompt(prompt: string): Promise<string>;
|
|
3305
|
-
}
|
|
3306
2978
|
/**
|
|
3307
2979
|
* ## Configuration
|
|
3308
2980
|
*
|
|
@@ -3352,20 +3024,6 @@ declare namespace CodeceptJS {
|
|
|
3352
3024
|
// @ts-ignore
|
|
3353
3025
|
// @ts-ignore
|
|
3354
3026
|
// @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
3027
|
type PlaywrightConfig = {
|
|
3370
3028
|
url?: string;
|
|
3371
3029
|
browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
|
|
@@ -6898,20 +6556,6 @@ declare namespace CodeceptJS {
|
|
|
6898
6556
|
// @ts-ignore
|
|
6899
6557
|
// @ts-ignore
|
|
6900
6558
|
// @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
6559
|
type PuppeteerConfig = {
|
|
6916
6560
|
url: string;
|
|
6917
6561
|
basicAuth?: any;
|
|
@@ -8859,20 +8503,6 @@ declare namespace CodeceptJS {
|
|
|
8859
8503
|
// @ts-ignore
|
|
8860
8504
|
// @ts-ignore
|
|
8861
8505
|
// @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
8506
|
type RESTConfig = {
|
|
8877
8507
|
endpoint?: string;
|
|
8878
8508
|
prettyPrintJson?: boolean;
|
|
@@ -9065,250 +8695,6 @@ declare namespace CodeceptJS {
|
|
|
9065
8695
|
*/
|
|
9066
8696
|
sendDeleteRequestWithPayload(url: any, payload?: any, headers?: any): Promise<any>;
|
|
9067
8697
|
}
|
|
9068
|
-
/**
|
|
9069
|
-
* SoftAssertHelper is a utility class for performing soft assertions.
|
|
9070
|
-
* Unlike traditional assertions that stop the execution on failure,
|
|
9071
|
-
* soft assertions allow the execution to continue and report all failures at the end.
|
|
9072
|
-
*
|
|
9073
|
-
* ### Examples
|
|
9074
|
-
*
|
|
9075
|
-
* Zero-configuration when paired with other helpers like REST, Playwright:
|
|
9076
|
-
*
|
|
9077
|
-
* ```js
|
|
9078
|
-
* // inside codecept.conf.js
|
|
9079
|
-
* {
|
|
9080
|
-
* helpers: {
|
|
9081
|
-
* Playwright: {...},
|
|
9082
|
-
* SoftExpectHelper: {},
|
|
9083
|
-
* }
|
|
9084
|
-
* }
|
|
9085
|
-
* ```
|
|
9086
|
-
*
|
|
9087
|
-
* ```js
|
|
9088
|
-
* // in scenario
|
|
9089
|
-
* I.softExpectEqual('a', 'b')
|
|
9090
|
-
* I.flushSoftAssertions() // Throws an error if any soft assertions have failed. The error message contains all the accumulated failures.
|
|
9091
|
-
* ```
|
|
9092
|
-
*
|
|
9093
|
-
* ## Methods
|
|
9094
|
-
*/
|
|
9095
|
-
class SoftAssertHelper {
|
|
9096
|
-
/**
|
|
9097
|
-
* Performs a soft assertion by executing the provided assertion function.
|
|
9098
|
-
* If the assertion fails, the error is caught and stored without halting the execution.
|
|
9099
|
-
* @param assertionFn - The assertion function to execute.
|
|
9100
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9101
|
-
*/
|
|
9102
|
-
softAssert(assertionFn: (...params: any[]) => any, customErrorMsg?: string): void;
|
|
9103
|
-
/**
|
|
9104
|
-
* Throws an error if any soft assertions have failed.
|
|
9105
|
-
* The error message contains all the accumulated failures.
|
|
9106
|
-
*/
|
|
9107
|
-
flushSoftAssertions(): void;
|
|
9108
|
-
/**
|
|
9109
|
-
* Softly asserts that two values are equal.
|
|
9110
|
-
* @param actualValue - The actual value.
|
|
9111
|
-
* @param expectedValue - The expected value.
|
|
9112
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9113
|
-
*/
|
|
9114
|
-
softExpectEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
|
|
9115
|
-
/**
|
|
9116
|
-
* Softly asserts that two values are not equal.
|
|
9117
|
-
* @param actualValue - The actual value.
|
|
9118
|
-
* @param expectedValue - The expected value.
|
|
9119
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9120
|
-
*/
|
|
9121
|
-
softExpectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
|
|
9122
|
-
/**
|
|
9123
|
-
* Softly asserts that two values are deeply equal.
|
|
9124
|
-
* @param actualValue - The actual value.
|
|
9125
|
-
* @param expectedValue - The expected value.
|
|
9126
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9127
|
-
*/
|
|
9128
|
-
softExpectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
|
|
9129
|
-
/**
|
|
9130
|
-
* Softly asserts that two values are not deeply equal.
|
|
9131
|
-
* @param actualValue - The actual value.
|
|
9132
|
-
* @param expectedValue - The expected value.
|
|
9133
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9134
|
-
*/
|
|
9135
|
-
softExpectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: string): void;
|
|
9136
|
-
/**
|
|
9137
|
-
* Softly asserts that a value contains the expected value.
|
|
9138
|
-
* @param actualValue - The actual value.
|
|
9139
|
-
* @param expectedValueToContain - The value that should be contained within the actual value.
|
|
9140
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9141
|
-
*/
|
|
9142
|
-
softExpectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: string): void;
|
|
9143
|
-
/**
|
|
9144
|
-
* Softly asserts that a value does not contain the expected value.
|
|
9145
|
-
* @param actualValue - The actual value.
|
|
9146
|
-
* @param expectedValueToNotContain - The value that should not be contained within the actual value.
|
|
9147
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9148
|
-
*/
|
|
9149
|
-
softExpectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: string): void;
|
|
9150
|
-
/**
|
|
9151
|
-
* Softly asserts that a value starts with the expected value.
|
|
9152
|
-
* @param actualValue - The actual value.
|
|
9153
|
-
* @param expectedValueToStartWith - The value that the actual value should start with.
|
|
9154
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9155
|
-
*/
|
|
9156
|
-
softExpectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: string): void;
|
|
9157
|
-
/**
|
|
9158
|
-
* Softly asserts that a value does not start with the expected value.
|
|
9159
|
-
* @param actualValue - The actual value.
|
|
9160
|
-
* @param expectedValueToNotStartWith - The value that the actual value should not start with.
|
|
9161
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9162
|
-
*/
|
|
9163
|
-
softExpectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: string): void;
|
|
9164
|
-
/**
|
|
9165
|
-
* Softly asserts that a value ends with the expected value.
|
|
9166
|
-
* @param actualValue - The actual value.
|
|
9167
|
-
* @param expectedValueToEndWith - The value that the actual value should end with.
|
|
9168
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9169
|
-
*/
|
|
9170
|
-
softExpectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: string): void;
|
|
9171
|
-
/**
|
|
9172
|
-
* Softly asserts that a value does not end with the expected value.
|
|
9173
|
-
* @param actualValue - The actual value.
|
|
9174
|
-
* @param expectedValueToNotEndWith - The value that the actual value should not end with.
|
|
9175
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9176
|
-
*/
|
|
9177
|
-
softExpectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: string): void;
|
|
9178
|
-
/**
|
|
9179
|
-
* Softly asserts that the target data matches the given JSON schema.
|
|
9180
|
-
* @param targetData - The data to validate.
|
|
9181
|
-
* @param jsonSchema - The JSON schema to validate against.
|
|
9182
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9183
|
-
*/
|
|
9184
|
-
softExpectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: string): void;
|
|
9185
|
-
/**
|
|
9186
|
-
* Softly asserts that the target data matches the given JSON schema using AJV.
|
|
9187
|
-
* @param targetData - The data to validate.
|
|
9188
|
-
* @param jsonSchema - The JSON schema to validate against.
|
|
9189
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9190
|
-
* @param [ajvOptions = { allErrors: true }] - Options to pass to AJV.
|
|
9191
|
-
*/
|
|
9192
|
-
softExpectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: string, ajvOptions?: any): void;
|
|
9193
|
-
/**
|
|
9194
|
-
* Softly asserts that the target data has the specified property.
|
|
9195
|
-
* @param targetData - The data to check.
|
|
9196
|
-
* @param propertyName - The property name to check for.
|
|
9197
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion
|
|
9198
|
-
* fails.
|
|
9199
|
-
*/
|
|
9200
|
-
softExpectHasProperty(targetData: any, propertyName: string, customErrorMsg?: string): void;
|
|
9201
|
-
/**
|
|
9202
|
-
* Softly asserts that the target data has a property with the specified name.
|
|
9203
|
-
* @param targetData - The data to check.
|
|
9204
|
-
* @param propertyName - The property name to check for.
|
|
9205
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9206
|
-
*/
|
|
9207
|
-
softExpectHasAProperty(targetData: any, propertyName: string, customErrorMsg?: string): void;
|
|
9208
|
-
/**
|
|
9209
|
-
* Softly asserts that the target data is of a specific type.
|
|
9210
|
-
* @param targetData - The data to check.
|
|
9211
|
-
* @param type - The expected type (e.g., 'string', 'number').
|
|
9212
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9213
|
-
*/
|
|
9214
|
-
softExpectToBeA(targetData: any, type: string, customErrorMsg?: string): void;
|
|
9215
|
-
/**
|
|
9216
|
-
* Softly asserts that the target data is of a specific type (alternative for articles).
|
|
9217
|
-
* @param targetData - The data to check.
|
|
9218
|
-
* @param type - The expected type (e.g., 'string', 'number').
|
|
9219
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9220
|
-
*/
|
|
9221
|
-
softExpectToBeAn(targetData: any, type: string, customErrorMsg?: string): void;
|
|
9222
|
-
/**
|
|
9223
|
-
* Softly asserts that the target data has a specified length.
|
|
9224
|
-
* @param targetData - The data to check.
|
|
9225
|
-
* @param length - The expected length.
|
|
9226
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9227
|
-
*/
|
|
9228
|
-
softExpectLengthOf(targetData: any, length: number, customErrorMsg?: string): void;
|
|
9229
|
-
/**
|
|
9230
|
-
* Softly asserts that the target data is empty.
|
|
9231
|
-
* @param targetData - The data to check.
|
|
9232
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9233
|
-
*/
|
|
9234
|
-
softExpectEmpty(targetData: any, customErrorMsg?: string): void;
|
|
9235
|
-
/**
|
|
9236
|
-
* Softly asserts that the target data is true.
|
|
9237
|
-
* @param targetData - The data to check.
|
|
9238
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9239
|
-
*/
|
|
9240
|
-
softExpectTrue(targetData: any, customErrorMsg?: string): void;
|
|
9241
|
-
/**
|
|
9242
|
-
* Softly asserts that the target data is false.
|
|
9243
|
-
* @param targetData - The data to check.
|
|
9244
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9245
|
-
*/
|
|
9246
|
-
softExpectFalse(targetData: any, customErrorMsg?: string): void;
|
|
9247
|
-
/**
|
|
9248
|
-
* Softly asserts that the target data is above a specified value.
|
|
9249
|
-
* @param targetData - The data to check.
|
|
9250
|
-
* @param aboveThan - The value that the target data should be above.
|
|
9251
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9252
|
-
*/
|
|
9253
|
-
softExpectAbove(targetData: any, aboveThan: any, customErrorMsg?: string): void;
|
|
9254
|
-
/**
|
|
9255
|
-
* Softly asserts that the target data is below a specified value.
|
|
9256
|
-
* @param targetData - The data to check.
|
|
9257
|
-
* @param belowThan - The value that the target data should be below.
|
|
9258
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9259
|
-
*/
|
|
9260
|
-
softExpectBelow(targetData: any, belowThan: any, customErrorMsg?: string): void;
|
|
9261
|
-
/**
|
|
9262
|
-
* Softly asserts that the length of the target data is above a specified value.
|
|
9263
|
-
* @param targetData - The data to check.
|
|
9264
|
-
* @param lengthAboveThan - The length that the target data should be above.
|
|
9265
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9266
|
-
*/
|
|
9267
|
-
softExpectLengthAboveThan(targetData: any, lengthAboveThan: number, customErrorMsg?: string): void;
|
|
9268
|
-
/**
|
|
9269
|
-
* Softly asserts that the length of the target data is below a specified value.
|
|
9270
|
-
* @param targetData - The data to check.
|
|
9271
|
-
* @param lengthBelowThan - The length that the target data should be below.
|
|
9272
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9273
|
-
*/
|
|
9274
|
-
softExpectLengthBelowThan(targetData: any, lengthBelowThan: number, customErrorMsg?: string): void;
|
|
9275
|
-
/**
|
|
9276
|
-
* Softly asserts that two values are equal, ignoring case.
|
|
9277
|
-
* @param actualValue - The actual string value.
|
|
9278
|
-
* @param expectedValue - The expected string value.
|
|
9279
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9280
|
-
*/
|
|
9281
|
-
softExpectEqualIgnoreCase(actualValue: string, expectedValue: string, customErrorMsg?: string): void;
|
|
9282
|
-
/**
|
|
9283
|
-
* Softly asserts that two arrays have deep equality, considering members in any order.
|
|
9284
|
-
* @param actualValue - The actual array.
|
|
9285
|
-
* @param expectedValue - The expected array.
|
|
9286
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9287
|
-
*/
|
|
9288
|
-
softExpectDeepMembers(actualValue: any[], expectedValue: any[], customErrorMsg?: string): void;
|
|
9289
|
-
/**
|
|
9290
|
-
* Softly asserts that an array (superset) deeply includes all members of another array (set).
|
|
9291
|
-
* @param superset - The array that should contain the expected members.
|
|
9292
|
-
* @param set - The array with members that should be included.
|
|
9293
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9294
|
-
*/
|
|
9295
|
-
softExpectDeepIncludeMembers(superset: any[], set: any[], customErrorMsg?: string): void;
|
|
9296
|
-
/**
|
|
9297
|
-
* Softly asserts that two objects are deeply equal, excluding specified fields.
|
|
9298
|
-
* @param actualValue - The actual object.
|
|
9299
|
-
* @param expectedValue - The expected object.
|
|
9300
|
-
* @param fieldsToExclude - The fields to exclude from the comparison.
|
|
9301
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9302
|
-
*/
|
|
9303
|
-
softExpectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: string[], customErrorMsg?: string): void;
|
|
9304
|
-
/**
|
|
9305
|
-
* Softly asserts that a value matches the expected pattern.
|
|
9306
|
-
* @param actualValue - The actual value.
|
|
9307
|
-
* @param expectedPattern - The pattern the value should match.
|
|
9308
|
-
* @param [customErrorMsg = ''] - A custom error message to display if the assertion fails.
|
|
9309
|
-
*/
|
|
9310
|
-
softExpectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: string): void;
|
|
9311
|
-
}
|
|
9312
8698
|
/**
|
|
9313
8699
|
* Client Functions
|
|
9314
8700
|
*/
|
|
@@ -10326,20 +9712,6 @@ declare namespace CodeceptJS {
|
|
|
10326
9712
|
// @ts-ignore
|
|
10327
9713
|
// @ts-ignore
|
|
10328
9714
|
// @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
9715
|
type WebDriverConfig = {
|
|
10344
9716
|
url: string;
|
|
10345
9717
|
browser: string;
|
|
@@ -12398,6 +11770,25 @@ declare namespace CodeceptJS {
|
|
|
12398
11770
|
[key: string]: any;
|
|
12399
11771
|
};
|
|
12400
11772
|
}
|
|
11773
|
+
/**
|
|
11774
|
+
* Result of the test run
|
|
11775
|
+
*/
|
|
11776
|
+
type Stats = {
|
|
11777
|
+
passes: number;
|
|
11778
|
+
failures: number;
|
|
11779
|
+
tests: number;
|
|
11780
|
+
pending: number;
|
|
11781
|
+
failedHooks: number;
|
|
11782
|
+
start: Date;
|
|
11783
|
+
end: Date;
|
|
11784
|
+
duration: number;
|
|
11785
|
+
};
|
|
11786
|
+
/**
|
|
11787
|
+
* Create Result of the test run
|
|
11788
|
+
*/
|
|
11789
|
+
class Result {
|
|
11790
|
+
constructor();
|
|
11791
|
+
}
|
|
12401
11792
|
/**
|
|
12402
11793
|
* Dependency Injection Container
|
|
12403
11794
|
*/
|
|
@@ -12426,6 +11817,10 @@ declare namespace CodeceptJS {
|
|
|
12426
11817
|
* Get Mocha instance
|
|
12427
11818
|
*/
|
|
12428
11819
|
static mocha(): any;
|
|
11820
|
+
/**
|
|
11821
|
+
* Get result
|
|
11822
|
+
*/
|
|
11823
|
+
static result(): Result;
|
|
12429
11824
|
/**
|
|
12430
11825
|
* Append new services to container
|
|
12431
11826
|
*/
|
|
@@ -12448,6 +11843,10 @@ declare namespace CodeceptJS {
|
|
|
12448
11843
|
* @param options - set {local: true} to not share among workers
|
|
12449
11844
|
*/
|
|
12450
11845
|
static share(data: any, options: any): void;
|
|
11846
|
+
/**
|
|
11847
|
+
* List of helpers that are used in CodeceptJS and can't be used together
|
|
11848
|
+
*/
|
|
11849
|
+
static STANDARD_ACTING_HELPERS: string[];
|
|
12451
11850
|
}
|
|
12452
11851
|
/**
|
|
12453
11852
|
* Method collect own property and prototype
|
|
@@ -12845,6 +12244,7 @@ declare namespace CodeceptJS {
|
|
|
12845
12244
|
var onPause: boolean;
|
|
12846
12245
|
var currentTest: CodeceptJS.Test | null;
|
|
12847
12246
|
var currentStep: any;
|
|
12247
|
+
var currentSuite: CodeceptJS.Suite | null;
|
|
12848
12248
|
}
|
|
12849
12249
|
/**
|
|
12850
12250
|
* Describe a "suite" with the given `title`
|
|
@@ -12944,6 +12344,46 @@ declare namespace CodeceptJS {
|
|
|
12944
12344
|
}): this;
|
|
12945
12345
|
}
|
|
12946
12346
|
function addStep(step: any, fn: any): void;
|
|
12347
|
+
/**
|
|
12348
|
+
* Creates a new Hook instance
|
|
12349
|
+
* @property suite - The test suite this hook belongs to
|
|
12350
|
+
* @property test - The test object associated with this hook
|
|
12351
|
+
* @property runnable - The current test being executed
|
|
12352
|
+
* @property ctx - The context object
|
|
12353
|
+
* @property err - The error that occurred during hook execution, if any
|
|
12354
|
+
* @param context - The context object containing suite and test information
|
|
12355
|
+
* @param context.suite - The test suite
|
|
12356
|
+
* @param context.test - The test object
|
|
12357
|
+
* @param context.ctx - The context object
|
|
12358
|
+
* @param error - The error object if hook execution failed
|
|
12359
|
+
*/
|
|
12360
|
+
class Hook {
|
|
12361
|
+
constructor(context: {
|
|
12362
|
+
suite: any;
|
|
12363
|
+
test: any;
|
|
12364
|
+
ctx: any;
|
|
12365
|
+
}, error: Error);
|
|
12366
|
+
/**
|
|
12367
|
+
* The test suite this hook belongs to
|
|
12368
|
+
*/
|
|
12369
|
+
suite: any;
|
|
12370
|
+
/**
|
|
12371
|
+
* The test object associated with this hook
|
|
12372
|
+
*/
|
|
12373
|
+
test: any;
|
|
12374
|
+
/**
|
|
12375
|
+
* The current test being executed
|
|
12376
|
+
*/
|
|
12377
|
+
runnable: any;
|
|
12378
|
+
/**
|
|
12379
|
+
* The context object
|
|
12380
|
+
*/
|
|
12381
|
+
ctx: any;
|
|
12382
|
+
/**
|
|
12383
|
+
* The error that occurred during hook execution, if any
|
|
12384
|
+
*/
|
|
12385
|
+
err: Error | null;
|
|
12386
|
+
}
|
|
12947
12387
|
function within(context: CodeceptJS.LocatorOrString, fn: (...params: any[]) => any): Promise<any> | undefined;
|
|
12948
12388
|
/**
|
|
12949
12389
|
* This is a wrapper on top of [Detox](https://github.com/wix/Detox) library, aimied to unify testing experience for CodeceptJS framework.
|
|
@@ -13554,3 +12994,8 @@ declare var helper: CodeceptJS.Helper;
|
|
|
13554
12994
|
*/
|
|
13555
12995
|
declare var helperMethod: string;
|
|
13556
12996
|
|
|
12997
|
+
/**
|
|
12998
|
+
* hide children steps from output
|
|
12999
|
+
*/
|
|
13000
|
+
declare var collsapsed: boolean;
|
|
13001
|
+
|