playwright-ts-automationframework 1.1.27 → 1.1.29

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.
@@ -381,7 +381,7 @@ var Actions = /** @class */ (function (_super) {
381
381
  case 0: return [4 /*yield*/, control.controlLocator.first().isChecked()];
382
382
  case 1:
383
383
  isChecked = _a.sent();
384
- (0, logs_core_1.logConsole)("'".concat(control.controlDescription, "' checkbox is ").concat(isChecked ? 'selected' : 'not selected'));
384
+ (0, logs_core_1.logConsole)("'".concat(control.controlDescription, "' checkbox is ").concat(isChecked, " ? 'selected' : 'not selected'"));
385
385
  return [2 /*return*/, isChecked];
386
386
  }
387
387
  });
@@ -404,7 +404,7 @@ var Actions = /** @class */ (function (_super) {
404
404
  return __generator(this, function (_a) {
405
405
  switch (_a.label) {
406
406
  case 0: return [4 /*yield*/, control.controlLocator.first().isEnabled().then(function (value) {
407
- (0, logs_core_1.logConsole)("'".concat(control.controlDescription, "' is ").concat(value ? 'enabled' : 'not enabled'));
407
+ (0, logs_core_1.logConsole)("'".concat(control.controlDescription, "' is ").concat(value, " ? 'enabled' : 'not enabled'"));
408
408
  return value;
409
409
  })];
410
410
  case 1: return [2 /*return*/, _a.sent()];
@@ -432,7 +432,7 @@ var Actions = /** @class */ (function (_super) {
432
432
  case 0: return [4 /*yield*/, control.controlLocator.first().isVisible()];
433
433
  case 1:
434
434
  isVisible = _a.sent();
435
- (0, logs_core_1.logConsole)("'".concat(control.controlDescription, "' is ").concat(isVisible ? 'displayed' : 'not displayed'));
435
+ (0, logs_core_1.logConsole)("'".concat(control.controlDescription, "' is ").concat(isVisible, " ? 'displayed' : 'not displayed'"));
436
436
  return [2 /*return*/, isVisible];
437
437
  }
438
438
  });
@@ -17,7 +17,7 @@ export declare class Assertion extends Actions {
17
17
  *
18
18
  * verifyIsEquals("Invalid username", "Invalid username");
19
19
  */
20
- verifyIsEquals(object1: any, object2: any): void;
20
+ verifyIsEquals(object1: any, object2: any, controlDescription?: string): void;
21
21
  /**
22
22
  * Verify first value contains substring as second.
23
23
  * If expected value is present in actual value then test case gets passsed else failed..
@@ -28,7 +28,7 @@ export declare class Assertion extends Actions {
28
28
  *
29
29
  * verifyIsContains("Invalid username Test", "Invalid username");
30
30
  */
31
- verifyIsContains(actual: string, expected: string): void;
31
+ verifyIsContains(actual: string, expected: string, controlDescription?: string): void;
32
32
  /**
33
33
  * Verify element's displayed/not displayed status as per expected value
34
34
  * If expected element's displayed status is as per expected then test case gets passed else failed..
@@ -74,10 +74,11 @@ var Assertion = /** @class */ (function (_super) {
74
74
  *
75
75
  * verifyIsEquals("Invalid username", "Invalid username");
76
76
  */
77
- Assertion.prototype.verifyIsEquals = function (object1, object2) {
77
+ Assertion.prototype.verifyIsEquals = function (object1, object2, controlDescription) {
78
+ if (controlDescription === void 0) { controlDescription = ""; }
78
79
  try {
79
80
  var verificationResult = object1 === object2 ? "PASSED" : "FAILED";
80
- (0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". Expected: '").concat(object1, "' Actual: '").concat(object2, "'"));
81
+ (0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". ").concat(controlDescription, " Expected: '").concat(object1, "' Actual: '").concat(object2, "'"));
81
82
  (0, test_1.expect)(object1).toBe(object2);
82
83
  }
83
84
  catch (error1) {
@@ -95,10 +96,11 @@ var Assertion = /** @class */ (function (_super) {
95
96
  *
96
97
  * verifyIsContains("Invalid username Test", "Invalid username");
97
98
  */
98
- Assertion.prototype.verifyIsContains = function (actual, expected) {
99
+ Assertion.prototype.verifyIsContains = function (actual, expected, controlDescription) {
100
+ if (controlDescription === void 0) { controlDescription = ""; }
99
101
  try {
100
102
  var verificationResult = actual.trim().includes(expected.trim()) ? "PASSED" : "FAILED";
101
- var logText = "VERIFICATION: ".concat(verificationResult, ". Actual: '").concat(actual, "' contains Expected: '").concat(expected.trim(), "'");
103
+ var logText = "VERIFICATION: ".concat(verificationResult, ". ").concat(controlDescription, " Actual: '").concat(actual, "' contains Expected: '").concat(expected.trim(), "'");
102
104
  (0, logs_core_1.logVerification)(logText);
103
105
  (0, test_1.expect)(actual.trim(), logText).toContain(expected.trim());
104
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright-ts-automationframework",
3
- "version": "1.1.27",
3
+ "version": "1.1.29",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",