playwright-ts-automationframework 1.1.39 → 1.1.40

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.
@@ -79,7 +79,7 @@ var Assertion = /** @class */ (function (_super) {
79
79
  try {
80
80
  var verificationResult = object1 === object2 ? "PASSED" : "FAILED";
81
81
  (0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". ").concat(controlDescription, " Expected: '").concat(object1, "' Actual: '").concat(object2, "'"));
82
- (0, test_1.expect)(object1).toBe(object2);
82
+ test_1.expect.soft(object1).toBe(object2);
83
83
  }
84
84
  catch (error1) {
85
85
  (0, logs_core_1.logError)("VERIFICATION: FAILED. Expected: '" + object1 + "' Actual: '" + object2 + "'");
@@ -102,7 +102,7 @@ var Assertion = /** @class */ (function (_super) {
102
102
  var verificationResult = actual.trim().includes(expected.trim()) ? "PASSED" : "FAILED";
103
103
  var logText = "VERIFICATION: ".concat(verificationResult, ". ").concat(controlDescription, " Actual: '").concat(actual, "' contains Expected: '").concat(expected.trim(), "'");
104
104
  (0, logs_core_1.logVerification)(logText);
105
- (0, test_1.expect)(actual.trim(), logText).toContain(expected.trim());
105
+ test_1.expect.soft(actual.trim(), logText).toContain(expected.trim());
106
106
  }
107
107
  catch (error1) {
108
108
  (0, logs_core_1.logError)("VERIFICATION: FAILED. Actual: '" + expected + "' contains Expected: '" + actual + "'");
@@ -135,7 +135,7 @@ var Assertion = /** @class */ (function (_super) {
135
135
  var verificationResult = value === expectedIsDisplayed ? "PASSED" : "FAILED";
136
136
  var logText = "VERIFICATION: ".concat(verificationResult, " '").concat(control.controlDescription, "' displayed status is '").concat(value, "' Expected: ").concat(expectedIsDisplayed);
137
137
  (0, logs_core_1.logVerification)(logText);
138
- (0, test_1.expect)(value, logText).toBe(expectedIsDisplayed);
138
+ test_1.expect.soft(value, logText).toBe(expectedIsDisplayed);
139
139
  }, function (reason) {
140
140
  (0, logs_core_1.logError)("VERIFICATION: FAILED. '" + control.controlDescription + "' displayed status is: '" + false + "' due to reason: " + reason);
141
141
  })];
@@ -184,7 +184,7 @@ var Assertion = /** @class */ (function (_super) {
184
184
  verificationResult = value === true ? "PASSED" : "FAILED";
185
185
  logText = "VERIFICATION: ".concat(verificationResult, ". '").concat(control.controlDescription, "' hidden status is '").concat(value, "' Expected: true");
186
186
  (0, logs_core_1.logVerification)(logText);
187
- return [4 /*yield*/, (0, test_1.expect)(element, logText).toBeHidden()];
187
+ return [4 /*yield*/, test_1.expect.soft(element, logText).toBeHidden()];
188
188
  case 1:
189
189
  _a.sent();
190
190
  return [2 /*return*/];
@@ -223,7 +223,7 @@ var Assertion = /** @class */ (function (_super) {
223
223
  verificationResult = (value === null || value === void 0 ? void 0 : value.trim()) === expectedAttributeValue ? "PASSED" : "FAILED";
224
224
  logText = "VERIFICATION: ".concat(verificationResult, ". Attribute value of ").concat(control.controlDescription, " Expected: '").concat(expectedAttributeValue, "' Actual : '").concat(value, "'");
225
225
  (0, logs_core_1.logVerification)(logText);
226
- (0, test_1.expect)(value, logText).toBe(expectedAttributeValue);
226
+ test_1.expect.soft(value, logText).toBe(expectedAttributeValue);
227
227
  return [2 /*return*/];
228
228
  });
229
229
  }); })];
@@ -254,26 +254,26 @@ var Assertion = /** @class */ (function (_super) {
254
254
  return __generator(this, function (_a) {
255
255
  switch (_a.label) {
256
256
  case 0: return [4 /*yield*/, this.getAttributeValue(control, attributeName).then(function (value) { return __awaiter(_this, void 0, void 0, function () {
257
- var verificationResult, logText, _a, _b;
258
- return __generator(this, function (_c) {
259
- switch (_c.label) {
257
+ var verificationResult, logText, _a, _b, _c, _d;
258
+ return __generator(this, function (_e) {
259
+ switch (_e.label) {
260
260
  case 0:
261
261
  if (!(value != null)) return [3 /*break*/, 2];
262
262
  verificationResult = value.includes(attributeValue) ? "PASSED" : "FAILED";
263
263
  logText = "VERIFICATION: ".concat(verificationResult, ". Atribute value of ").concat(control.controlLocator, " Expected: '").concat(attributeValue, "' contains Actual : '").concat(value, "'");
264
264
  (0, logs_core_1.logVerification)(logText);
265
- _a = test_1.expect;
265
+ _b = (_a = test_1.expect).soft;
266
266
  return [4 /*yield*/, this.getAttributeValue(control, attributeName)];
267
267
  case 1:
268
- _a.apply(void 0, [_c.sent(), logText]).toContain(attributeValue);
268
+ _b.apply(_a, [_e.sent(), logText]).toContain(attributeValue);
269
269
  return [3 /*break*/, 4];
270
270
  case 2:
271
271
  (0, logs_core_1.logVerification)("VERIFICATION: FAILED. Expected: '".concat(attributeValue, "' does not contains Actual: '").concat(value, "'"));
272
- _b = test_1.expect;
272
+ _d = (_c = test_1.expect).soft;
273
273
  return [4 /*yield*/, this.getAttributeValue(control, attributeName)];
274
274
  case 3:
275
- _b.apply(void 0, [_c.sent(), "VERIFICATION: FAILED. Expected: '".concat(attributeValue, "' does not contains Actual: '").concat(value, "'")]).toContain(attributeValue);
276
- _c.label = 4;
275
+ _d.apply(_c, [_e.sent(), "VERIFICATION: FAILED. Expected: '".concat(attributeValue, "' does not contains Actual: '").concat(value, "'")]).toContain(attributeValue);
276
+ _e.label = 4;
277
277
  case 4: return [2 /*return*/];
278
278
  }
279
279
  });
@@ -312,7 +312,7 @@ var Assertion = /** @class */ (function (_super) {
312
312
  var verificationResult = value === expValue ? "PASSED" : "FAILED";
313
313
  var logText = "VERIFICATION: ".concat(verificationResult, " '").concat(control.controlDescription, "' enabled status is: '").concat(value, "' Expected: ").concat(expValue);
314
314
  (0, logs_core_1.logVerification)(logText);
315
- (0, test_1.expect)(value, logText).toBe(expValue);
315
+ test_1.expect.soft(value, logText).toBe(expValue);
316
316
  })];
317
317
  case 3:
318
318
  _a.sent();
@@ -345,7 +345,7 @@ var Assertion = /** @class */ (function (_super) {
345
345
  var verificationResult = isChecked === expValue ? "PASSED" : "FAILED";
346
346
  var logText = "VERIFICATION: ".concat(verificationResult, " '").concat(control.controlDescription, "' selected status is: '").concat(isChecked, "' Expected: ").concat(expValue);
347
347
  (0, logs_core_1.logVerification)(logText);
348
- (0, test_1.expect)(isChecked, logText).toBe(expValue);
348
+ test_1.expect.soft(isChecked, logText).toBe(expValue);
349
349
  })];
350
350
  case 3:
351
351
  _a.sent();
@@ -374,7 +374,7 @@ var Assertion = /** @class */ (function (_super) {
374
374
  var verificationResult = (value === null || value === void 0 ? void 0 : value.trim()) === expectedText.trim() ? "PASSED" : "FAILED";
375
375
  var logText = "VERIFICATION: '".concat(verificationResult, "' Verify text of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
376
376
  (0, logs_core_1.logVerification)(logText);
377
- (0, test_1.expect)(value === null || value === void 0 ? void 0 : value.trim(), logText).toBe(expectedText.trim());
377
+ test_1.expect.soft(value === null || value === void 0 ? void 0 : value.trim(), logText).toBe(expectedText.trim());
378
378
  })];
379
379
  case 1:
380
380
  _a.sent();
@@ -403,7 +403,7 @@ var Assertion = /** @class */ (function (_super) {
403
403
  var verificationResult = (value === null || value === void 0 ? void 0 : value.trim().includes(expectedText.trim())) ? "PASSED" : "FAILED";
404
404
  var logText = "VERIFICATION: ".concat(verificationResult, ". Verify text of ").concat(control.controlDescription, " .Expected: '").concat(expectedText.trim(), "' is present in Actual: '").concat(value === null || value === void 0 ? void 0 : value.trim(), "'");
405
405
  (0, logs_core_1.logVerification)(logText);
406
- (0, test_1.expect)(value === null || value === void 0 ? void 0 : value.trim(), logText).toContain(expectedText.trim());
406
+ test_1.expect.soft(value === null || value === void 0 ? void 0 : value.trim(), logText).toContain(expectedText.trim());
407
407
  })];
408
408
  case 1:
409
409
  _a.sent();
@@ -432,7 +432,7 @@ var Assertion = /** @class */ (function (_super) {
432
432
  var verificationResult = (value === null || value === void 0 ? void 0 : value.trim().includes(expectedText)) ? "PASSED" : "FAILED";
433
433
  var logText = "VERIFICATION: ".concat(verificationResult, ". Verify text of ").concat(control.controlDescription, " Expected: '").concat(expectedText, "' does not contains Actual: '").concat(value, "'");
434
434
  (0, logs_core_1.logVerification)(logText);
435
- (0, test_1.expect)(false, logText).toBe(value === null || value === void 0 ? void 0 : value.trim().includes(expectedText.trim()));
435
+ test_1.expect.soft(false, logText).toBe(value === null || value === void 0 ? void 0 : value.trim().includes(expectedText.trim()));
436
436
  })];
437
437
  case 1:
438
438
  _a.sent();
@@ -461,7 +461,7 @@ var Assertion = /** @class */ (function (_super) {
461
461
  var verificationResult = (value === null || value === void 0 ? void 0 : value.trim()) === expectedText ? "PASSED" : "FAILED";
462
462
  var logText = "VERIFICATION: ".concat(verificationResult, " Verify textbox value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
463
463
  (0, logs_core_1.logVerification)(logText);
464
- (0, test_1.expect)(value, logText).toEqual(expectedText);
464
+ test_1.expect.soft(value, logText).toEqual(expectedText);
465
465
  })];
466
466
  case 1:
467
467
  _a.sent();
@@ -490,7 +490,7 @@ var Assertion = /** @class */ (function (_super) {
490
490
  var verificationResult = value.trim() === expectedText ? "PASSED" : "FAILED";
491
491
  var logText = "VERIFICATION: ".concat(verificationResult, " Verify value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
492
492
  (0, logs_core_1.logVerification)(logText);
493
- (0, test_1.expect)(value, logText).toEqual(expectedText);
493
+ test_1.expect.soft(value, logText).toEqual(expectedText);
494
494
  })];
495
495
  case 1:
496
496
  _a.sent();
@@ -519,7 +519,7 @@ var Assertion = /** @class */ (function (_super) {
519
519
  var verificationResult = value.trim() === expectedText ? "PASSED" : "FAILED";
520
520
  var logText = "VERIFICATION: ".concat(verificationResult, " Verify value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
521
521
  (0, logs_core_1.logVerification)(logText);
522
- (0, test_1.expect)(value, logText).toEqual(expectedText);
522
+ test_1.expect.soft(value, logText).toEqual(expectedText);
523
523
  })];
524
524
  case 1:
525
525
  _a.sent();
@@ -548,7 +548,7 @@ var Assertion = /** @class */ (function (_super) {
548
548
  var verificationResult = value === isChecked ? "PASSED" : "FAILED";
549
549
  var logText = "VERIFICATION: ".concat(verificationResult, " Verify checkbox value of ").concat(control.controlDescription, ". Expected: '").concat(value, "' Actual: '").concat(isChecked, "'");
550
550
  (0, logs_core_1.logVerification)(logText);
551
- (0, test_1.expect)(isChecked, logText).toBe(value);
551
+ test_1.expect.soft(isChecked, logText).toBe(value);
552
552
  })];
553
553
  case 1:
554
554
  _a.sent();
@@ -585,7 +585,7 @@ var Assertion = /** @class */ (function (_super) {
585
585
  verificationResult = (tagName === null || tagName === void 0 ? void 0 : tagName.toLowerCase()) == expectedTagName.toLowerCase() ? "PASSED" : "FAILED";
586
586
  logText = "VERIFICATION: ".concat(verificationResult, " Verify Tagname of ").concat(control.controlDescription, ". Expected: '").concat(expectedTagName.toLowerCase(), "' Actual: '").concat(tagName === null || tagName === void 0 ? void 0 : tagName.toLowerCase(), "'");
587
587
  (0, logs_core_1.logVerification)(logText);
588
- (0, test_1.expect)(tagName === null || tagName === void 0 ? void 0 : tagName.toLowerCase(), logText).toBe(expectedTagName.toLowerCase());
588
+ test_1.expect.soft(tagName === null || tagName === void 0 ? void 0 : tagName.toLowerCase(), logText).toBe(expectedTagName.toLowerCase());
589
589
  return [2 /*return*/];
590
590
  }
591
591
  });
@@ -617,7 +617,7 @@ var Assertion = /** @class */ (function (_super) {
617
617
  }).length;
618
618
  verificationResult = count >= 1 ? "PASSED" : "FAILED";
619
619
  (0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". '").concat(valueToVerify, "' is Present in list '").concat(control.controlDescription, "'"));
620
- (0, test_1.expect)(count).toBeGreaterThanOrEqual(1);
620
+ test_1.expect.soft(count).toBeGreaterThanOrEqual(1);
621
621
  return [2 /*return*/];
622
622
  }
623
623
  });
@@ -661,7 +661,7 @@ var Assertion = /** @class */ (function (_super) {
661
661
  }).length;
662
662
  verificationResult = count >= 1 ? "PASSED" : "FAILED";
663
663
  (0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". '").concat(expectedValue, "' is Present in list '").concat(control.controlDescription, "'"));
664
- (0, test_1.expect)(count).toBeGreaterThanOrEqual(1);
664
+ test_1.expect.soft(count).toBeGreaterThanOrEqual(1);
665
665
  return [2 /*return*/];
666
666
  }
667
667
  });
@@ -695,7 +695,7 @@ var Assertion = /** @class */ (function (_super) {
695
695
  return [4 /*yield*/, list[i].innerText().then(function (value) {
696
696
  var verificationResult = value.trim().includes(listOfValueToVerify[i]) ? "PASSED" : "FAILED";
697
697
  (0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". Expected: '").concat(listOfValueToVerify[i], "' Actual: '").concat(value, "'"));
698
- (0, test_1.expect)(value.trim()).toContain(listOfValueToVerify[i]);
698
+ test_1.expect.soft(value.trim()).toContain(listOfValueToVerify[i]);
699
699
  })];
700
700
  case 2:
701
701
  _b.sent();
@@ -738,7 +738,7 @@ var Assertion = /** @class */ (function (_super) {
738
738
  verificationResult = dialog.message().includes(expectedText) ? "PASSED" : "FAILED";
739
739
  logText = "VERIFICATION: ".concat(verificationResult, " Verify alert text. Expected: '").concat(expectedText, "' Actual: '").concat(dialog.message(), "'");
740
740
  (0, logs_core_1.logVerification)(logText);
741
- (0, test_1.expect)(dialog.message(), logText).toContain(expectedText);
741
+ test_1.expect.soft(dialog.message(), logText).toContain(expectedText);
742
742
  return [2 /*return*/];
743
743
  });
744
744
  }); });
@@ -763,7 +763,7 @@ var Assertion = /** @class */ (function (_super) {
763
763
  var verificationResult = value.includes(subString) ? "PASSED" : "FAILED";
764
764
  var logText = "VERIFICATION: ".concat(verificationResult, " Verify URL contains. Expected: '").concat(subString, "' Actual: '").concat(value, "'");
765
765
  (0, logs_core_1.logVerification)(logText);
766
- (0, test_1.expect)(value, logText).toContain(subString);
766
+ test_1.expect.soft(value, logText).toContain(subString);
767
767
  })];
768
768
  case 1:
769
769
  _a.sent();
@@ -791,7 +791,7 @@ var Assertion = /** @class */ (function (_super) {
791
791
  var verificationResult = value == expectedCount ? "PASSED" : "FAILED";
792
792
  var logText = "VERIFICATION: ".concat(verificationResult, " Verify count of elements of ").concat(control.controlDescription, ". Expected: '").concat(expectedCount, "' Actual: '").concat(value, "'");
793
793
  (0, logs_core_1.logVerification)(logText);
794
- (0, test_1.expect)(value, logText).toBe(expectedCount);
794
+ test_1.expect.soft(value, logText).toBe(expectedCount);
795
795
  })];
796
796
  case 1:
797
797
  _a.sent();
@@ -808,7 +808,7 @@ var Assertion = /** @class */ (function (_super) {
808
808
  var verificationResult = value >= expectedCount ? "PASSED" : "FAILED";
809
809
  var logText = "VERIFICATION: ".concat(verificationResult, " Verify count of elements of ").concat(control.controlDescription, ". Expected: '").concat(expectedCount, "' Actual: '").concat(value, "'");
810
810
  (0, logs_core_1.logVerification)(logText);
811
- (0, test_1.expect)(value, logText).toBeGreaterThanOrEqual(expectedCount);
811
+ test_1.expect.soft(value, logText).toBeGreaterThanOrEqual(expectedCount);
812
812
  })];
813
813
  case 1:
814
814
  _a.sent();
@@ -825,7 +825,7 @@ var Assertion = /** @class */ (function (_super) {
825
825
  var verificationResult = value <= expectedCount ? "PASSED" : "FAILED";
826
826
  var logText = "VERIFICATION: ".concat(verificationResult, " Verify count of elements of ").concat(control.controlDescription, ". Expected: '").concat(expectedCount, "' Actual: '").concat(value, "'");
827
827
  (0, logs_core_1.logVerification)(logText);
828
- (0, test_1.expect)(value, logText).toBeLessThanOrEqual(expectedCount);
828
+ test_1.expect.soft(value, logText).toBeLessThanOrEqual(expectedCount);
829
829
  })];
830
830
  case 1:
831
831
  _a.sent();
@@ -854,7 +854,7 @@ var Assertion = /** @class */ (function (_super) {
854
854
  var verificationResult = value.trim().includes(expectedText) ? "PASSED" : "FAILED";
855
855
  var logText = "VERIFICATION: ".concat(verificationResult, " Verify title contains. Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
856
856
  (0, logs_core_1.logVerification)(logText);
857
- (0, test_1.expect)(value.trim(), logText).toContain(expectedText);
857
+ test_1.expect.soft(value.trim(), logText).toContain(expectedText);
858
858
  }, function (reason) {
859
859
  (0, logs_core_1.logError)('Error : ' + reason);
860
860
  })];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright-ts-automationframework",
3
- "version": "1.1.39",
3
+ "version": "1.1.40",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",