@izara_project/izara-testing-shared 1.0.8 → 1.0.9

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/TestingLib.js +26 -44
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@izara_project/izara-testing-shared",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Libraries shared by both local and deployed test environments",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/TestingLib.js CHANGED
@@ -243,14 +243,22 @@ function checkOutputEventOneLevel(
243
243
  }
244
244
 
245
245
  } else {
246
+ if (eventForTestingOneLevel[propertyName] === null && propertyConfig.value === null) {
247
+ _izContext.logger.debug("eventForTestingOneLevel is null", {
248
+ "eventForTestingOneLevel[propertyName]": eventForTestingOneLevel[propertyName],
249
+ "propertyConfig.value": propertyConfig.value
250
+ });
251
+ } else {
252
+ _izContext.logger.debug("message event is not mach test config", eventForTestingOneLevel[propertyName], { propertyName, eventForTestingOneLevel });
253
+ // // mismatch eventForTestingOneLevel
254
+ propertyNotPass.push({
255
+ prefix: notPassPrefix,
256
+ error: `message event is not mach test config`,
257
+ receivedValue: eventForTestingOneLevel,
258
+ expectedValue: testEventConfigOneLevel
259
+ })
260
+ }
246
261
 
247
- // // mismatch eventForTestingOneLevel
248
- propertyNotPass.push({
249
- prefix: notPassPrefix,
250
- error: `message event is not mach test config`,
251
- receivedValue: eventForTestingOneLevel,
252
- expectedValue: testEventConfigOneLevel
253
- })
254
262
 
255
263
  // };
256
264
  // }
@@ -448,8 +456,17 @@ function matchingEventOneLevel(
448
456
  };
449
457
 
450
458
  } else {
451
- _izContext.logger.debug("propertyName not exist ineventForTestingOneLevel", eventForTestingOneLevel[propertyName], { propertyName, eventForTestingOneLevel });
452
- return false
459
+ if (eventForTestingOneLevel[propertyName] === null && propertyConfig.value === null) {
460
+ _izContext.logger.debug("eventForTestingOneLevel is null", {
461
+ "eventForTestingOneLevel[propertyName]": eventForTestingOneLevel[propertyName],
462
+ "propertyConfig.value": propertyConfig.value
463
+ });
464
+ } else {
465
+ _izContext.logger.debug("propertyName not exist ineventForTestingOneLevel", eventForTestingOneLevel[propertyName], { propertyName, eventForTestingOneLevel });
466
+ return false
467
+ }
468
+
469
+
453
470
  }
454
471
  } else {
455
472
  // continue to next property if property(ex.requestParams) has set forStageMatching: false.
@@ -461,41 +478,6 @@ function matchingEventOneLevel(
461
478
  }
462
479
  return true;
463
480
  };
464
- // matchingEventOneLevel(
465
- // _izContext,
466
- // {
467
- // properties: {
468
- // callingFlow: {
469
- // forStageMatching: true,
470
- // Value: 'maxxCart2TestProcessValidateCart'
471
- // },
472
- // 'x-correlation-base-user-id': {
473
- // forStageMatching: true,
474
- // Value: 'maxx'
475
-
476
- // }
477
- // }
478
- // },
479
- // {
480
- // callingFlow: { Type: 'String', Value: 'maxxCart2TestProcessValidateCart' },
481
- // 'x-correlation-intTest-time': { Type: 'String', Value: '1766387880112' },
482
- // 'x-correlation-intTest-serviceTag': { Type: 'String', Value: 'IntTesting' },
483
- // 'x-correlation-call-chain-length': { Type: 'String', Value: '1' },
484
- // 'x-correlation-intTest-tag': {
485
- // Type: 'String',
486
- // Value: 'validateCart_cartValidationStatus_valid_CaseCombineWinIsTrueAndFalse_ESmodule_003_Complete'
487
- // },
488
- // serviceTag: { Type: 'String', Value: 'IntTesting' },
489
- // 'x-correlation-id': { Type: 'String', Value: 'b0e7188c-32c0-428a-8202-c15642445e63' },
490
- // 'x-correlation-debug-log-enabled': { Type: 'String', Value: 'false' },
491
- // 'x-correlation-base-user-id': { Type: 'String', Value: 'maxx' }
492
- // },
493
- // 1
494
-
495
- // )
496
-
497
- // end recursive function
498
-
499
481
 
500
482
  function isObject(object) {
501
483