playwright-ts-automationframework 1.1.52 → 1.1.54
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/core/actions.core.d.ts +4 -2
- package/lib/core/actions.core.js +34 -2
- package/lib/core/assertion.core.js +36 -36
- package/package.json +6 -6
|
@@ -95,8 +95,8 @@ export declare class Actions extends BasePage {
|
|
|
95
95
|
*
|
|
96
96
|
* selectDropDownByText(cityDrpdwn, "Sydney");
|
|
97
97
|
*/
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
selectFromDropdownByText(control: WebControl, optionTobeSelcted: string): Promise<void>;
|
|
99
|
+
selectFromDropdownByPartialText(control: WebControl, partialText: string): Promise<void>;
|
|
100
100
|
/**
|
|
101
101
|
* Select dropdown element by index.
|
|
102
102
|
*
|
|
@@ -261,6 +261,8 @@ export declare class Actions extends BasePage {
|
|
|
261
261
|
* findAll(dateColumn);
|
|
262
262
|
*/
|
|
263
263
|
findAll(control: WebControl): Promise<import("playwright-core").Locator[]>;
|
|
264
|
+
getAllInnerText(control: WebControl): Promise<string[]>;
|
|
265
|
+
getAllTextContents(control: WebControl): Promise<string[]>;
|
|
264
266
|
/**
|
|
265
267
|
* Read the web URL
|
|
266
268
|
*
|
package/lib/core/actions.core.js
CHANGED
|
@@ -271,7 +271,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
271
271
|
*
|
|
272
272
|
* selectDropDownByText(cityDrpdwn, "Sydney");
|
|
273
273
|
*/
|
|
274
|
-
Actions.prototype.
|
|
274
|
+
Actions.prototype.selectFromDropdownByText = function (control, optionTobeSelcted) {
|
|
275
275
|
return __awaiter(this, void 0, void 0, function () {
|
|
276
276
|
return __generator(this, function (_a) {
|
|
277
277
|
switch (_a.label) {
|
|
@@ -289,7 +289,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
289
289
|
});
|
|
290
290
|
});
|
|
291
291
|
};
|
|
292
|
-
Actions.prototype.
|
|
292
|
+
Actions.prototype.selectFromDropdownByPartialText = function (control, partialText) {
|
|
293
293
|
return __awaiter(this, void 0, void 0, function () {
|
|
294
294
|
var options, matchingOption;
|
|
295
295
|
return __generator(this, function (_a) {
|
|
@@ -739,6 +739,38 @@ var Actions = /** @class */ (function (_super) {
|
|
|
739
739
|
});
|
|
740
740
|
});
|
|
741
741
|
};
|
|
742
|
+
Actions.prototype.getAllInnerText = function (control) {
|
|
743
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
744
|
+
var allElements;
|
|
745
|
+
return __generator(this, function (_a) {
|
|
746
|
+
switch (_a.label) {
|
|
747
|
+
case 0: return [4 /*yield*/, this.waitTillElementIsPresent(control)];
|
|
748
|
+
case 1:
|
|
749
|
+
_a.sent();
|
|
750
|
+
return [4 /*yield*/, control.controlLocator.allInnerTexts()];
|
|
751
|
+
case 2:
|
|
752
|
+
allElements = _a.sent();
|
|
753
|
+
return [2 /*return*/, allElements];
|
|
754
|
+
}
|
|
755
|
+
});
|
|
756
|
+
});
|
|
757
|
+
};
|
|
758
|
+
Actions.prototype.getAllTextContents = function (control) {
|
|
759
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
760
|
+
var allElements;
|
|
761
|
+
return __generator(this, function (_a) {
|
|
762
|
+
switch (_a.label) {
|
|
763
|
+
case 0: return [4 /*yield*/, this.waitTillElementIsPresent(control)];
|
|
764
|
+
case 1:
|
|
765
|
+
_a.sent();
|
|
766
|
+
return [4 /*yield*/, control.controlLocator.allTextContents()];
|
|
767
|
+
case 2:
|
|
768
|
+
allElements = _a.sent();
|
|
769
|
+
return [2 /*return*/, allElements];
|
|
770
|
+
}
|
|
771
|
+
});
|
|
772
|
+
});
|
|
773
|
+
};
|
|
742
774
|
/**
|
|
743
775
|
* Read the web URL
|
|
744
776
|
*
|
|
@@ -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
|
-
|
|
82
|
+
test_1.expect.soft(object1).toEqual(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
|
-
|
|
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
|
-
|
|
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
|
})];
|
|
@@ -178,7 +178,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
178
178
|
verificationResult = value === true ? "PASSED" : "FAILED";
|
|
179
179
|
logText = "VERIFICATION: ".concat(verificationResult, ". '").concat(control.controlDescription, "' hidden status is '").concat(value, "' Expected: true");
|
|
180
180
|
(0, logs_core_1.logVerification)(logText);
|
|
181
|
-
|
|
181
|
+
test_1.expect.soft(value, logText).toBe(true);
|
|
182
182
|
return [2 /*return*/];
|
|
183
183
|
});
|
|
184
184
|
}); })];
|
|
@@ -214,7 +214,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
214
214
|
verificationResult = (value === null || value === void 0 ? void 0 : value.trim()) === expectedAttributeValue ? "PASSED" : "FAILED";
|
|
215
215
|
logText = "VERIFICATION: ".concat(verificationResult, ". Attribute value of ").concat(control.controlDescription, " Expected: '").concat(expectedAttributeValue, "' Actual : '").concat(value, "'");
|
|
216
216
|
(0, logs_core_1.logVerification)(logText);
|
|
217
|
-
|
|
217
|
+
test_1.expect.soft(value, logText).toBe(expectedAttributeValue);
|
|
218
218
|
return [2 /*return*/];
|
|
219
219
|
});
|
|
220
220
|
}); })];
|
|
@@ -245,26 +245,26 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
245
245
|
return __generator(this, function (_a) {
|
|
246
246
|
switch (_a.label) {
|
|
247
247
|
case 0: return [4 /*yield*/, this.getAttributeValue(control, attributeName).then(function (value) { return __awaiter(_this, void 0, void 0, function () {
|
|
248
|
-
var verificationResult, logText, _a, _b;
|
|
249
|
-
return __generator(this, function (
|
|
250
|
-
switch (
|
|
248
|
+
var verificationResult, logText, _a, _b, _c, _d;
|
|
249
|
+
return __generator(this, function (_e) {
|
|
250
|
+
switch (_e.label) {
|
|
251
251
|
case 0:
|
|
252
252
|
if (!(value != null)) return [3 /*break*/, 2];
|
|
253
253
|
verificationResult = value.trim().includes(attributeValue) ? "PASSED" : "FAILED";
|
|
254
254
|
logText = "VERIFICATION: ".concat(verificationResult, ". Atribute value of ").concat(control.controlLocator, " Expected: '").concat(attributeValue, "' contains Actual : '").concat(value, "'");
|
|
255
255
|
(0, logs_core_1.logVerification)(logText);
|
|
256
|
-
_a = test_1.expect;
|
|
256
|
+
_b = (_a = test_1.expect).soft;
|
|
257
257
|
return [4 /*yield*/, this.getAttributeValue(control, attributeName)];
|
|
258
258
|
case 1:
|
|
259
|
-
|
|
259
|
+
_b.apply(_a, [_e.sent(), logText]).toContain(attributeValue);
|
|
260
260
|
return [3 /*break*/, 4];
|
|
261
261
|
case 2:
|
|
262
262
|
(0, logs_core_1.logVerification)("VERIFICATION: FAILED. Expected: '".concat(attributeValue, "' does not contains Actual: '").concat(value, "'"));
|
|
263
|
-
|
|
263
|
+
_d = (_c = test_1.expect).soft;
|
|
264
264
|
return [4 /*yield*/, this.getAttributeValue(control, attributeName)];
|
|
265
265
|
case 3:
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
_d.apply(_c, [_e.sent(), "VERIFICATION: FAILED. Expected: '".concat(attributeValue, "' does not contains Actual: '").concat(value, "'")]).toContain(attributeValue);
|
|
267
|
+
_e.label = 4;
|
|
268
268
|
case 4: return [2 /*return*/];
|
|
269
269
|
}
|
|
270
270
|
});
|
|
@@ -303,7 +303,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
303
303
|
var verificationResult = value === expValue ? "PASSED" : "FAILED";
|
|
304
304
|
var logText = "VERIFICATION: ".concat(verificationResult, " '").concat(control.controlDescription, "' enabled status is: '").concat(value, "' Expected: ").concat(expValue);
|
|
305
305
|
(0, logs_core_1.logVerification)(logText);
|
|
306
|
-
|
|
306
|
+
test_1.expect.soft(value, logText).toBe(expValue);
|
|
307
307
|
})];
|
|
308
308
|
case 3:
|
|
309
309
|
_a.sent();
|
|
@@ -336,7 +336,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
336
336
|
var verificationResult = isChecked === expValue ? "PASSED" : "FAILED";
|
|
337
337
|
var logText = "VERIFICATION: ".concat(verificationResult, " '").concat(control.controlDescription, "' selected status is: '").concat(isChecked, "' Expected: ").concat(expValue);
|
|
338
338
|
(0, logs_core_1.logVerification)(logText);
|
|
339
|
-
|
|
339
|
+
test_1.expect.soft(isChecked, logText).toBe(expValue);
|
|
340
340
|
})];
|
|
341
341
|
case 3:
|
|
342
342
|
_a.sent();
|
|
@@ -365,7 +365,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
365
365
|
var verificationResult = (value === null || value === void 0 ? void 0 : value.trim()) === expectedText.trim() ? "PASSED" : "FAILED";
|
|
366
366
|
var logText = "VERIFICATION: '".concat(verificationResult, "' Verify text of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
367
367
|
(0, logs_core_1.logVerification)(logText);
|
|
368
|
-
|
|
368
|
+
test_1.expect.soft(value === null || value === void 0 ? void 0 : value.trim(), logText).toBe(expectedText.trim());
|
|
369
369
|
})];
|
|
370
370
|
case 1:
|
|
371
371
|
_a.sent();
|
|
@@ -394,7 +394,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
394
394
|
var verificationResult = (value === null || value === void 0 ? void 0 : value.trim().includes(expectedText.trim())) ? "PASSED" : "FAILED";
|
|
395
395
|
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(), "'");
|
|
396
396
|
(0, logs_core_1.logVerification)(logText);
|
|
397
|
-
|
|
397
|
+
test_1.expect.soft(value === null || value === void 0 ? void 0 : value.trim(), logText).toContain(expectedText.trim());
|
|
398
398
|
})];
|
|
399
399
|
case 1:
|
|
400
400
|
_a.sent();
|
|
@@ -423,7 +423,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
423
423
|
var verificationResult = (value === null || value === void 0 ? void 0 : value.trim().includes(expectedText)) ? "PASSED" : "FAILED";
|
|
424
424
|
var logText = "VERIFICATION: ".concat(verificationResult, ". Verify text of ").concat(control.controlDescription, " Expected: '").concat(expectedText, "' does not contains Actual: '").concat(value, "'");
|
|
425
425
|
(0, logs_core_1.logVerification)(logText);
|
|
426
|
-
|
|
426
|
+
test_1.expect.soft(false, logText).toBe(value === null || value === void 0 ? void 0 : value.trim().includes(expectedText.trim()));
|
|
427
427
|
})];
|
|
428
428
|
case 1:
|
|
429
429
|
_a.sent();
|
|
@@ -452,7 +452,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
452
452
|
var verificationResult = (value === null || value === void 0 ? void 0 : value.trim()) === expectedText ? "PASSED" : "FAILED";
|
|
453
453
|
var logText = "VERIFICATION: ".concat(verificationResult, " Verify textbox value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
454
454
|
(0, logs_core_1.logVerification)(logText);
|
|
455
|
-
|
|
455
|
+
test_1.expect.soft(value === null || value === void 0 ? void 0 : value.trim(), logText).toEqual(expectedText);
|
|
456
456
|
})];
|
|
457
457
|
case 1:
|
|
458
458
|
_a.sent();
|
|
@@ -469,7 +469,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
469
469
|
var verificationResult = (value === null || value === void 0 ? void 0 : value.trim().includes(expectedText)) ? "PASSED" : "FAILED";
|
|
470
470
|
var logText = "VERIFICATION: ".concat(verificationResult, " Verify textbox value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
471
471
|
(0, logs_core_1.logVerification)(logText);
|
|
472
|
-
|
|
472
|
+
test_1.expect.soft(value === null || value === void 0 ? void 0 : value.trim(), logText).toContain(expectedText);
|
|
473
473
|
})];
|
|
474
474
|
case 1:
|
|
475
475
|
_a.sent();
|
|
@@ -498,7 +498,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
498
498
|
var verificationResult = value.trim() === expectedText ? "PASSED" : "FAILED";
|
|
499
499
|
var logText = "VERIFICATION: ".concat(verificationResult, " Verify value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
500
500
|
(0, logs_core_1.logVerification)(logText);
|
|
501
|
-
|
|
501
|
+
test_1.expect.soft(value.trim(), logText).toEqual(expectedText);
|
|
502
502
|
})];
|
|
503
503
|
case 1:
|
|
504
504
|
_a.sent();
|
|
@@ -515,7 +515,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
515
515
|
var verificationResult = value.trim().includes(expectedText) ? "PASSED" : "FAILED";
|
|
516
516
|
var logText = "VERIFICATION: ".concat(verificationResult, " Verify value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
517
517
|
(0, logs_core_1.logVerification)(logText);
|
|
518
|
-
|
|
518
|
+
test_1.expect.soft(value.trim(), logText).toContain(expectedText);
|
|
519
519
|
})];
|
|
520
520
|
case 1:
|
|
521
521
|
_a.sent();
|
|
@@ -544,7 +544,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
544
544
|
var verificationResult = value.trim() === expectedText ? "PASSED" : "FAILED";
|
|
545
545
|
var logText = "VERIFICATION: ".concat(verificationResult, " Verify value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
546
546
|
(0, logs_core_1.logVerification)(logText);
|
|
547
|
-
|
|
547
|
+
test_1.expect.soft(value.trim(), logText).toEqual(expectedText);
|
|
548
548
|
})];
|
|
549
549
|
case 1:
|
|
550
550
|
_a.sent();
|
|
@@ -561,7 +561,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
561
561
|
var verificationResult = value.trim().includes(expectedText) ? "PASSED" : "FAILED";
|
|
562
562
|
var logText = "VERIFICATION: ".concat(verificationResult, " Verify value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
563
563
|
(0, logs_core_1.logVerification)(logText);
|
|
564
|
-
|
|
564
|
+
test_1.expect.soft(value.trim(), logText).toContain(expectedText);
|
|
565
565
|
})];
|
|
566
566
|
case 1:
|
|
567
567
|
_a.sent();
|
|
@@ -590,7 +590,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
590
590
|
var verificationResult = value === isChecked ? "PASSED" : "FAILED";
|
|
591
591
|
var logText = "VERIFICATION: ".concat(verificationResult, " Verify checkbox value of ").concat(control.controlDescription, ". Expected: '").concat(value, "' Actual: '").concat(isChecked, "'");
|
|
592
592
|
(0, logs_core_1.logVerification)(logText);
|
|
593
|
-
|
|
593
|
+
test_1.expect.soft(isChecked, logText).toBe(value);
|
|
594
594
|
})];
|
|
595
595
|
case 1:
|
|
596
596
|
_a.sent();
|
|
@@ -627,7 +627,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
627
627
|
verificationResult = (tagName === null || tagName === void 0 ? void 0 : tagName.toLowerCase()) == expectedTagName.toLowerCase() ? "PASSED" : "FAILED";
|
|
628
628
|
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(), "'");
|
|
629
629
|
(0, logs_core_1.logVerification)(logText);
|
|
630
|
-
|
|
630
|
+
test_1.expect.soft(tagName === null || tagName === void 0 ? void 0 : tagName.toLowerCase(), logText).toBe(expectedTagName.toLowerCase());
|
|
631
631
|
return [2 /*return*/];
|
|
632
632
|
}
|
|
633
633
|
});
|
|
@@ -659,7 +659,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
659
659
|
}).length;
|
|
660
660
|
verificationResult = count >= 1 ? "PASSED" : "FAILED";
|
|
661
661
|
(0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". '").concat(valueToVerify, "' is Present in list '").concat(control.controlDescription, "'"));
|
|
662
|
-
|
|
662
|
+
test_1.expect.soft(count).toBeGreaterThanOrEqual(1);
|
|
663
663
|
return [2 /*return*/];
|
|
664
664
|
}
|
|
665
665
|
});
|
|
@@ -703,7 +703,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
703
703
|
}).length;
|
|
704
704
|
verificationResult = count >= 1 ? "PASSED" : "FAILED";
|
|
705
705
|
(0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". '").concat(expectedValue, "' is Present in list '").concat(control.controlDescription, "'"));
|
|
706
|
-
|
|
706
|
+
test_1.expect.soft(count).toBeGreaterThanOrEqual(1);
|
|
707
707
|
return [2 /*return*/];
|
|
708
708
|
}
|
|
709
709
|
});
|
|
@@ -765,7 +765,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
765
765
|
}).length;
|
|
766
766
|
verificationResult = count >= 1 ? "PASSED" : "FAILED";
|
|
767
767
|
(0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". '").concat(expectedValue, "' is Present in list '").concat(control.controlDescription, "'"));
|
|
768
|
-
|
|
768
|
+
test_1.expect.soft(count).toBeGreaterThanOrEqual(1);
|
|
769
769
|
return [2 /*return*/];
|
|
770
770
|
}
|
|
771
771
|
});
|
|
@@ -799,7 +799,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
799
799
|
return [4 /*yield*/, list[i].innerText().then(function (value) {
|
|
800
800
|
var verificationResult = value.trim().includes(listOfValueToVerify[i]) ? "PASSED" : "FAILED";
|
|
801
801
|
(0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". Expected: '").concat(listOfValueToVerify[i], "' Actual: '").concat(value, "'"));
|
|
802
|
-
|
|
802
|
+
test_1.expect.soft(value.trim()).toContain(listOfValueToVerify[i]);
|
|
803
803
|
})];
|
|
804
804
|
case 2:
|
|
805
805
|
_b.sent();
|
|
@@ -842,7 +842,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
842
842
|
verificationResult = dialog.message().includes(expectedText) ? "PASSED" : "FAILED";
|
|
843
843
|
logText = "VERIFICATION: ".concat(verificationResult, " Verify alert text. Expected: '").concat(expectedText, "' Actual: '").concat(dialog.message(), "'");
|
|
844
844
|
(0, logs_core_1.logVerification)(logText);
|
|
845
|
-
|
|
845
|
+
test_1.expect.soft(dialog.message(), logText).toContain(expectedText);
|
|
846
846
|
return [2 /*return*/];
|
|
847
847
|
});
|
|
848
848
|
}); });
|
|
@@ -867,7 +867,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
867
867
|
var verificationResult = value.includes(subString) ? "PASSED" : "FAILED";
|
|
868
868
|
var logText = "VERIFICATION: ".concat(verificationResult, " Verify URL contains. Expected: '").concat(subString, "' Actual: '").concat(value, "'");
|
|
869
869
|
(0, logs_core_1.logVerification)(logText);
|
|
870
|
-
|
|
870
|
+
test_1.expect.soft(value.trim(), logText).toContain(subString);
|
|
871
871
|
})];
|
|
872
872
|
case 1:
|
|
873
873
|
_a.sent();
|
|
@@ -895,7 +895,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
895
895
|
var verificationResult = value == expectedCount ? "PASSED" : "FAILED";
|
|
896
896
|
var logText = "VERIFICATION: ".concat(verificationResult, " Verify count of elements of ").concat(control.controlDescription, ". Expected: '").concat(expectedCount, "' Actual: '").concat(value, "'");
|
|
897
897
|
(0, logs_core_1.logVerification)(logText);
|
|
898
|
-
|
|
898
|
+
test_1.expect.soft(value, logText).toBe(expectedCount);
|
|
899
899
|
})];
|
|
900
900
|
case 1:
|
|
901
901
|
_a.sent();
|
|
@@ -912,7 +912,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
912
912
|
var verificationResult = value >= expectedCount ? "PASSED" : "FAILED";
|
|
913
913
|
var logText = "VERIFICATION: ".concat(verificationResult, " Verify count of elements of ").concat(control.controlDescription, ". Expected: '").concat(expectedCount, "' Actual: '").concat(value, "'");
|
|
914
914
|
(0, logs_core_1.logVerification)(logText);
|
|
915
|
-
|
|
915
|
+
test_1.expect.soft(value, logText).toBeGreaterThanOrEqual(expectedCount);
|
|
916
916
|
})];
|
|
917
917
|
case 1:
|
|
918
918
|
_a.sent();
|
|
@@ -929,7 +929,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
929
929
|
var verificationResult = value <= expectedCount ? "PASSED" : "FAILED";
|
|
930
930
|
var logText = "VERIFICATION: ".concat(verificationResult, " Verify count of elements of ").concat(control.controlDescription, ". Expected: '").concat(expectedCount, "' Actual: '").concat(value, "'");
|
|
931
931
|
(0, logs_core_1.logVerification)(logText);
|
|
932
|
-
|
|
932
|
+
test_1.expect.soft(value, logText).toBeLessThanOrEqual(expectedCount);
|
|
933
933
|
})];
|
|
934
934
|
case 1:
|
|
935
935
|
_a.sent();
|
|
@@ -958,7 +958,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
958
958
|
var verificationResult = value.trim().includes(expectedText) ? "PASSED" : "FAILED";
|
|
959
959
|
var logText = "VERIFICATION: ".concat(verificationResult, " Verify title contains. Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
960
960
|
(0, logs_core_1.logVerification)(logText);
|
|
961
|
-
|
|
961
|
+
test_1.expect.soft(value.trim(), logText).toContain(expectedText);
|
|
962
962
|
}, function (reason) {
|
|
963
963
|
(0, logs_core_1.logError)('Error : ' + reason);
|
|
964
964
|
})];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playwright-ts-automationframework",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.54",
|
|
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.
|
|
23
|
-
"@types/node": "^22.
|
|
22
|
+
"@playwright/test": "^1.52.0",
|
|
23
|
+
"@types/node": "^22.15.17",
|
|
24
24
|
"log4js": "^6.9.1",
|
|
25
|
-
"nodemailer": "^
|
|
26
|
-
"npm": "^11.
|
|
25
|
+
"nodemailer": "^7.0.3",
|
|
26
|
+
"npm": "^11.3.0",
|
|
27
27
|
"path": "^0.12.7",
|
|
28
|
-
"typescript": "^5.8.
|
|
28
|
+
"typescript": "^5.8.3"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"lib/**/**"
|