playwright-ts-automationframework 1.1.63 → 1.1.67

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.
@@ -100,6 +100,7 @@ export declare class Assertion extends Actions {
100
100
  * verifyIsEnabled(loginBtn, true);
101
101
  */
102
102
  verifyIsEnabled(control: WebControl, expValue?: boolean): Promise<void>;
103
+ verifyIsDisabled(control: WebControl, expValue?: boolean): Promise<void>;
103
104
  /**
104
105
  * The function `verifyIsSelected` asynchronously verifies if a web control is selected with an
105
106
  * expected boolean value.
@@ -170,7 +170,7 @@ var Assertion = /** @class */ (function (_super) {
170
170
  _a.sent();
171
171
  return [4 /*yield*/, this.isDisplayed(control).then(function (value) {
172
172
  var verificationResult = value === expectedIsDisplayed ? "✅ PASSED" : "❌ FAILED";
173
- var logText = "VERIFICATION: '".concat(verificationResult, "' '").concat(control.controlDescription, "' displayed status is '").concat(value, "' Expected: ").concat(expectedIsDisplayed);
173
+ var logText = "VERIFICATION: '".concat(verificationResult, "' '").concat(control.controlDescription, "' displayed status is '").concat(value, "' Expected: '").concat(expectedIsDisplayed, "'");
174
174
  (0, logs_core_1.logVerification)(logText);
175
175
  test_1.expect.soft(value, logText).toBe(expectedIsDisplayed);
176
176
  }, function (reason) {
@@ -213,7 +213,7 @@ var Assertion = /** @class */ (function (_super) {
213
213
  var verificationResult, logText;
214
214
  return __generator(this, function (_a) {
215
215
  verificationResult = value === true ? "✅ PASSED" : "❌ FAILED";
216
- logText = "VERIFICATION: '".concat(verificationResult, "'. '").concat(control.controlDescription, "' hidden status is '").concat(value, "' Expected: true");
216
+ logText = "VERIFICATION: '".concat(verificationResult, "'. '").concat(control.controlDescription, "' hidden status is '").concat(value, "' Expected: 'true'");
217
217
  (0, logs_core_1.logVerification)(logText);
218
218
  test_1.expect.soft(value, logText).toBe(true);
219
219
  return [2 /*return*/];
@@ -327,20 +327,52 @@ var Assertion = /** @class */ (function (_super) {
327
327
  */
328
328
  Assertion.prototype.verifyIsEnabled = function (control_1) {
329
329
  return __awaiter(this, arguments, void 0, function (control, expValue) {
330
- var value, verificationResult, logText;
331
330
  if (expValue === void 0) { expValue = true; }
332
331
  return __generator(this, function (_a) {
333
332
  switch (_a.label) {
334
- case 0: return [4 /*yield*/, this.page.waitForLoadState("load")];
333
+ case 0:
334
+ if (!(expValue == true)) return [3 /*break*/, 2];
335
+ return [4 /*yield*/, this.page.waitForLoadState("load")];
335
336
  case 1:
336
337
  _a.sent();
337
- return [4 /*yield*/, control.controlLocator.first().isEnabled()];
338
+ _a.label = 2;
338
339
  case 2:
339
- value = _a.sent();
340
- verificationResult = value === expValue ? "✅ PASSED" : "❌ FAILED";
341
- logText = "VERIFICATION: '".concat(verificationResult, "' '").concat(control.controlDescription, "' enabled status is: '").concat(value, "' Expected: ").concat(expValue);
342
- (0, logs_core_1.logVerification)(logText);
343
- test_1.expect.soft(value, logText).toBe(expValue);
340
+ if (!expValue) return [3 /*break*/, 4];
341
+ return [4 /*yield*/, control.controlLocator.isEnabled().then(function (value) {
342
+ var verificationResult = value === true ? "PASSED" : "Failed";
343
+ (0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, " '").concat(control.controlDescription, "' enabled status is: '").concat(value, "'"));
344
+ (0, test_1.expect)(value).toBe(true);
345
+ })];
346
+ case 3:
347
+ _a.sent();
348
+ return [3 /*break*/, 6];
349
+ case 4: return [4 /*yield*/, this.verifyIsDisabled(control, true)];
350
+ case 5:
351
+ _a.sent();
352
+ _a.label = 6;
353
+ case 6: return [2 /*return*/];
354
+ }
355
+ });
356
+ });
357
+ };
358
+ Assertion.prototype.verifyIsDisabled = function (control_1) {
359
+ return __awaiter(this, arguments, void 0, function (control, expValue) {
360
+ if (expValue === void 0) { expValue = true; }
361
+ return __generator(this, function (_a) {
362
+ switch (_a.label) {
363
+ case 0:
364
+ if (!(expValue == true)) return [3 /*break*/, 2];
365
+ return [4 /*yield*/, this.page.waitForLoadState("load")];
366
+ case 1:
367
+ _a.sent();
368
+ _a.label = 2;
369
+ case 2: return [4 /*yield*/, control.controlLocator.isDisabled().then(function (value) {
370
+ var verificationResult = value === true ? "PASSED" : "Failed";
371
+ (0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, " '").concat(control.controlDescription, "' disabled status is: '").concat(value, "'"));
372
+ (0, test_1.expect)(value).toBe(true);
373
+ })];
374
+ case 3:
375
+ _a.sent();
344
376
  return [2 /*return*/];
345
377
  }
346
378
  });
@@ -368,7 +400,7 @@ var Assertion = /** @class */ (function (_super) {
368
400
  _a.label = 2;
369
401
  case 2: return [4 /*yield*/, control.controlLocator.first().isChecked().then(function (isChecked) {
370
402
  var verificationResult = isChecked === expValue ? "✅ PASSED" : "❌ FAILED";
371
- var logText = "VERIFICATION: '".concat(verificationResult, "' '").concat(control.controlDescription, "' selected status is: '").concat(isChecked, "' Expected: ").concat(expValue);
403
+ var logText = "VERIFICATION: '".concat(verificationResult, "' '").concat(control.controlDescription, "' selected status is: '").concat(isChecked, "' Expected: '").concat(expValue, "'");
372
404
  (0, logs_core_1.logVerification)(logText);
373
405
  test_1.expect.soft(isChecked, logText).toBe(expValue);
374
406
  })];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright-ts-automationframework",
3
- "version": "1.1.63",
3
+ "version": "1.1.67",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -19,13 +19,13 @@
19
19
  "ignore-case": "^0.1.0"
20
20
  },
21
21
  "dependencies": {
22
- "@playwright/test": "^1.54.1",
23
- "@types/node": "^24.1.0",
22
+ "@playwright/test": "^1.56.1",
23
+ "@types/node": "^24.9.1",
24
24
  "log4js": "^6.9.1",
25
- "nodemailer": "^7.0.5",
26
- "npm": "^11.5.1",
25
+ "nodemailer": "^7.0.9",
26
+ "npm": "^11.6.2",
27
27
  "path": "^0.12.7",
28
- "typescript": "^5.8.3"
28
+ "typescript": "^5.9.3"
29
29
  },
30
30
  "files": [
31
31
  "lib/**/**"