playwright-ts-automationframework 1.1.54 → 1.1.56
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.js +29 -29
- package/lib/core/assertion.core.js +63 -63
- package/package.json +3 -3
package/lib/core/actions.core.js
CHANGED
|
@@ -82,8 +82,8 @@ var Actions = /** @class */ (function (_super) {
|
|
|
82
82
|
case 0: return [4 /*yield*/, control.controlLocator.first().click({ force: isforceful }).then(function () {
|
|
83
83
|
(0, logs_core_1.logAction)("Clicked on '" + control.controlDescription + "'");
|
|
84
84
|
}, function (error) {
|
|
85
|
-
(0, logs_core_1.logError)("Unable to click on '"
|
|
86
|
-
(0, logs_core_1.logConsole)("Error: '"
|
|
85
|
+
(0, logs_core_1.logError)("\u274C Unable to click on '".concat(control.controlDescription, "'"));
|
|
86
|
+
(0, logs_core_1.logConsole)("Error: '".concat(error, "'"));
|
|
87
87
|
throw error;
|
|
88
88
|
})];
|
|
89
89
|
case 1:
|
|
@@ -111,8 +111,8 @@ var Actions = /** @class */ (function (_super) {
|
|
|
111
111
|
case 0: return [4 /*yield*/, control.controlLocator.first().hover().then(function () {
|
|
112
112
|
(0, logs_core_1.logAction)("Mouse hover to '" + control.controlDescription + "'");
|
|
113
113
|
}, function (error) {
|
|
114
|
-
(0, logs_core_1.logError)("Unable to mouse hover on
|
|
115
|
-
(0, logs_core_1.logConsole)("Error: '"
|
|
114
|
+
(0, logs_core_1.logError)("\u274C Unable to mouse hover on '".concat(control.controlDescription, "'"));
|
|
115
|
+
(0, logs_core_1.logConsole)("Error: '".concat(error, "'"));
|
|
116
116
|
})];
|
|
117
117
|
case 1:
|
|
118
118
|
_a.sent();
|
|
@@ -165,13 +165,13 @@ var Actions = /** @class */ (function (_super) {
|
|
|
165
165
|
switch (_a.label) {
|
|
166
166
|
case 0: return [4 /*yield*/, control.controlLocator.first().fill(textTobeEntered).then(function () {
|
|
167
167
|
if (control.controlDescription.trim().toLowerCase().endsWith('textbox')) {
|
|
168
|
-
(0, logs_core_1.logAction)("Entered '"
|
|
168
|
+
(0, logs_core_1.logAction)("Entered '".concat(textTobeEntered, "' in '").concat(control.controlDescription, "'"));
|
|
169
169
|
}
|
|
170
170
|
else {
|
|
171
|
-
(0, logs_core_1.logAction)("Entered '"
|
|
171
|
+
(0, logs_core_1.logAction)("Entered '".concat(textTobeEntered, "' in '").concat(control.controlDescription, "' textbox"));
|
|
172
172
|
}
|
|
173
173
|
}, function (error) {
|
|
174
|
-
(0, logs_core_1.logError)("Unable to enter text in '"
|
|
174
|
+
(0, logs_core_1.logError)("\u274C Unable to enter text in '".concat(control.controlDescription, "' textbox due to reason: ").concat(error));
|
|
175
175
|
throw error;
|
|
176
176
|
})];
|
|
177
177
|
case 1:
|
|
@@ -187,13 +187,13 @@ var Actions = /** @class */ (function (_super) {
|
|
|
187
187
|
switch (_a.label) {
|
|
188
188
|
case 0: return [4 /*yield*/, control.controlLocator.first().fill(textTobeEntered).then(function () {
|
|
189
189
|
if (control.controlDescription.trim().toLowerCase().endsWith('textbox')) {
|
|
190
|
-
(0, logs_core_1.logAction)("Entered '********' in '"
|
|
190
|
+
(0, logs_core_1.logAction)("Entered '********' in '".concat(control.controlDescription, "'"));
|
|
191
191
|
}
|
|
192
192
|
else {
|
|
193
|
-
(0, logs_core_1.logAction)("Entered '********' in '"
|
|
193
|
+
(0, logs_core_1.logAction)("Entered '********' in '".concat(control.controlDescription, "' textbox"));
|
|
194
194
|
}
|
|
195
195
|
}, function (error) {
|
|
196
|
-
(0, logs_core_1.logError)("Unable to enter text in '"
|
|
196
|
+
(0, logs_core_1.logError)("\u274C Unable to enter text in '".concat(control.controlDescription, "' textbox due to reason: ").concat(error));
|
|
197
197
|
throw error;
|
|
198
198
|
})];
|
|
199
199
|
case 1:
|
|
@@ -220,7 +220,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
220
220
|
return __generator(this, function (_a) {
|
|
221
221
|
switch (_a.label) {
|
|
222
222
|
case 0: return [4 /*yield*/, control.controlLocator.first().press(key).then(function () {
|
|
223
|
-
(0, logs_core_1.logAction)("Press Key '"
|
|
223
|
+
(0, logs_core_1.logAction)("Press Key '".concat(key.toUpperCase(), "' on '").concat(control.controlDescription, "'"));
|
|
224
224
|
})];
|
|
225
225
|
case 1:
|
|
226
226
|
_a.sent();
|
|
@@ -248,8 +248,8 @@ var Actions = /** @class */ (function (_super) {
|
|
|
248
248
|
case 0: return [4 /*yield*/, control.controlLocator.first().selectOption({ value: optionTobeSelcted }).then(function () {
|
|
249
249
|
(0, logs_core_1.logAction)("Selected '" + optionTobeSelcted + "' from '" + control.controlDescription + "'");
|
|
250
250
|
}, function (error) {
|
|
251
|
-
(0, logs_core_1.logError)("Unable to select '"
|
|
252
|
-
(0, logs_core_1.logConsole)("Error: '"
|
|
251
|
+
(0, logs_core_1.logError)("\u274C Unable to select '".concat(optionTobeSelcted, "' from '").concat(control.controlDescription, "'"));
|
|
252
|
+
(0, logs_core_1.logConsole)("Error: '".concat(error, "'"));
|
|
253
253
|
throw error;
|
|
254
254
|
})];
|
|
255
255
|
case 1:
|
|
@@ -276,10 +276,10 @@ var Actions = /** @class */ (function (_super) {
|
|
|
276
276
|
return __generator(this, function (_a) {
|
|
277
277
|
switch (_a.label) {
|
|
278
278
|
case 0: return [4 /*yield*/, control.controlLocator.first().selectOption({ label: optionTobeSelcted }).then(function () {
|
|
279
|
-
(0, logs_core_1.logAction)("Selected '"
|
|
279
|
+
(0, logs_core_1.logAction)("Selected '".concat(optionTobeSelcted, "' from '").concat(control.controlDescription, "'"));
|
|
280
280
|
}, function (error) {
|
|
281
|
-
(0, logs_core_1.logError)("Unable to select '"
|
|
282
|
-
(0, logs_core_1.logConsole)("Error: '"
|
|
281
|
+
(0, logs_core_1.logError)("\u274C Unable to select '".concat(optionTobeSelcted, "' from '").concat(control.controlDescription, "'"));
|
|
282
|
+
(0, logs_core_1.logConsole)("Error: '".concat(error, "'"));
|
|
283
283
|
throw error;
|
|
284
284
|
})];
|
|
285
285
|
case 1:
|
|
@@ -299,13 +299,13 @@ var Actions = /** @class */ (function (_super) {
|
|
|
299
299
|
options = _a.sent();
|
|
300
300
|
matchingOption = options.find(function (option) { return option.includes(partialText); });
|
|
301
301
|
if (!matchingOption) {
|
|
302
|
-
(0, logs_core_1.logError)("No option found containing '".concat(partialText, "' in '").concat(control.controlDescription, "'"));
|
|
302
|
+
(0, logs_core_1.logError)("\u274C No option found containing '".concat(partialText, "' in '").concat(control.controlDescription, "'"));
|
|
303
303
|
throw new Error("No matching option found for '".concat(partialText, "'"));
|
|
304
304
|
}
|
|
305
305
|
return [4 /*yield*/, control.controlLocator.first().selectOption({ label: matchingOption }).then(function () {
|
|
306
306
|
(0, logs_core_1.logAction)("Selected '".concat(matchingOption, "' from '").concat(control.controlDescription, "'"));
|
|
307
307
|
}, function (error) {
|
|
308
|
-
(0, logs_core_1.logError)("Unable to select '".concat(matchingOption, "' from '").concat(control.controlDescription, "'"));
|
|
308
|
+
(0, logs_core_1.logError)("\u274C Unable to select '".concat(matchingOption, "' from '").concat(control.controlDescription, "'"));
|
|
309
309
|
(0, logs_core_1.logConsole)("Error: '".concat(error, "'"));
|
|
310
310
|
throw error;
|
|
311
311
|
})];
|
|
@@ -335,8 +335,8 @@ var Actions = /** @class */ (function (_super) {
|
|
|
335
335
|
case 0: return [4 /*yield*/, control.controlLocator.first().selectOption({ index: index }).then(function () {
|
|
336
336
|
(0, logs_core_1.logAction)("Selected '" + index + "' option from '" + control.controlDescription + "'");
|
|
337
337
|
}, function (error) {
|
|
338
|
-
(0, logs_core_1.logError)("Unable to select '"
|
|
339
|
-
(0, logs_core_1.
|
|
338
|
+
(0, logs_core_1.logError)("\u274C Unable to select '".concat(index, "' option from '").concat(control.controlDescription, "'"));
|
|
339
|
+
(0, logs_core_1.logConsole)("Error: '".concat(error, "'"));
|
|
340
340
|
throw error;
|
|
341
341
|
})];
|
|
342
342
|
case 1:
|
|
@@ -370,14 +370,14 @@ var Actions = /** @class */ (function (_super) {
|
|
|
370
370
|
control.controlLocator.first().check().then(function () {
|
|
371
371
|
(0, logs_core_1.logAction)("Set checkbox value of '" + control.controlDescription + "' as checked");
|
|
372
372
|
}, function (error) {
|
|
373
|
-
(0, logs_core_1.logError)("Unable
|
|
373
|
+
(0, logs_core_1.logError)("\u274C Unable to set checkbox value of '".concat(control.controlDescription, "' as checked"));
|
|
374
374
|
throw error;
|
|
375
375
|
});
|
|
376
376
|
return [3 /*break*/, 4];
|
|
377
377
|
case 2: return [4 /*yield*/, control.controlLocator.first().uncheck().then(function () {
|
|
378
378
|
(0, logs_core_1.logAction)("Set checkbox value of '" + control.controlDescription + "' as unchecked");
|
|
379
379
|
}, function (error) {
|
|
380
|
-
(0, logs_core_1.logError)("Unable
|
|
380
|
+
(0, logs_core_1.logError)("\u274C Unable to set checkbox value of '".concat(control.controlDescription, "' as unchecked"));
|
|
381
381
|
throw error;
|
|
382
382
|
})];
|
|
383
383
|
case 3:
|
|
@@ -499,7 +499,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
499
499
|
return [2 /*return*/, text];
|
|
500
500
|
case 2:
|
|
501
501
|
error_1 = _a.sent();
|
|
502
|
-
(0, logs_core_1.logError)("Unable to read the text from '".concat(control.controlDescription, "' due to reason: ").concat(error_1));
|
|
502
|
+
(0, logs_core_1.logError)("\u274C Unable to read the text from '".concat(control.controlDescription, "' due to reason: ").concat(error_1));
|
|
503
503
|
return [2 /*return*/, '']; // Return an empty string or handle it as needed
|
|
504
504
|
case 3: return [2 /*return*/];
|
|
505
505
|
}
|
|
@@ -531,7 +531,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
531
531
|
return [2 /*return*/, value];
|
|
532
532
|
case 2:
|
|
533
533
|
error_2 = _a.sent();
|
|
534
|
-
(0, logs_core_1.logError)("Unable to read the value from '".concat(control.controlDescription, "' due to reason: ").concat(error_2));
|
|
534
|
+
(0, logs_core_1.logError)("\u274C Unable to read the value from '".concat(control.controlDescription, "' due to reason: ").concat(error_2));
|
|
535
535
|
return [2 /*return*/, '']; // Return an empty string or handle it as needed
|
|
536
536
|
case 3: return [2 /*return*/];
|
|
537
537
|
}
|
|
@@ -563,7 +563,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
563
563
|
return [2 /*return*/, value];
|
|
564
564
|
case 2:
|
|
565
565
|
error_3 = _a.sent();
|
|
566
|
-
(0, logs_core_1.logError)("Unable to read the value from '".concat(control.controlDescription, "' due to reason: ").concat(error_3));
|
|
566
|
+
(0, logs_core_1.logError)("\u274C Unable to read the value from '".concat(control.controlDescription, "' due to reason: ").concat(error_3));
|
|
567
567
|
return [2 /*return*/, '']; // Return an empty string or handle it as needed
|
|
568
568
|
case 3: return [2 /*return*/];
|
|
569
569
|
}
|
|
@@ -596,7 +596,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
596
596
|
return [2 /*return*/, value];
|
|
597
597
|
case 2:
|
|
598
598
|
error_4 = _a.sent();
|
|
599
|
-
(0, logs_core_1.logError)("Unable to read attribute value from '".concat(control.controlDescription, "' - Reason: ").concat(error_4));
|
|
599
|
+
(0, logs_core_1.logError)("\u274C Unable to read attribute value from '".concat(control.controlDescription, "' - Reason: ").concat(error_4));
|
|
600
600
|
return [2 /*return*/, null];
|
|
601
601
|
case 3: return [2 /*return*/];
|
|
602
602
|
}
|
|
@@ -667,7 +667,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
667
667
|
(0, logs_core_1.logAction)('Alert is accepted');
|
|
668
668
|
return true;
|
|
669
669
|
}, function (error) {
|
|
670
|
-
(0, logs_core_1.logError)("Unable to accept alert: "
|
|
670
|
+
(0, logs_core_1.logError)("\u274C Unable to accept alert: ".concat(error));
|
|
671
671
|
throw error;
|
|
672
672
|
})];
|
|
673
673
|
case 1:
|
|
@@ -677,7 +677,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
677
677
|
(0, logs_core_1.logAction)('Alert is dismissed');
|
|
678
678
|
return false;
|
|
679
679
|
}, function (error) {
|
|
680
|
-
(0, logs_core_1.logError)("Unable to dismiss alert: "
|
|
680
|
+
(0, logs_core_1.logError)("\u274C Unable to dismiss alert: ".concat(error));
|
|
681
681
|
throw error;
|
|
682
682
|
})];
|
|
683
683
|
case 3:
|
|
@@ -704,7 +704,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
704
704
|
return __generator(this, function (_a) {
|
|
705
705
|
this.page.on('dialog', function (dialog) { return __awaiter(_this, void 0, void 0, function () {
|
|
706
706
|
return __generator(this, function (_a) {
|
|
707
|
-
(0, logs_core_1.logConsole)(
|
|
707
|
+
(0, logs_core_1.logConsole)("Alert is Displayed with text: ".concat(dialog.message()));
|
|
708
708
|
return [2 /*return*/];
|
|
709
709
|
});
|
|
710
710
|
}); });
|
|
@@ -77,12 +77,12 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
77
77
|
Assertion.prototype.verifyIsEquals = function (object1, object2, controlDescription) {
|
|
78
78
|
if (controlDescription === void 0) { controlDescription = ""; }
|
|
79
79
|
try {
|
|
80
|
-
var verificationResult = object1 === object2 ? "PASSED" : "FAILED";
|
|
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
|
-
(0, logs_core_1.logError)("VERIFICATION: FAILED. Expected: '" + object1 + "' Actual: '" + object2 + "'");
|
|
85
|
+
(0, logs_core_1.logError)("VERIFICATION: '❌ FAILED'. Expected: '" + object1 + "' Actual: '" + object2 + "'");
|
|
86
86
|
throw error1;
|
|
87
87
|
}
|
|
88
88
|
};
|
|
@@ -99,13 +99,13 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
99
99
|
Assertion.prototype.verifyIsContains = function (actual, expected, controlDescription) {
|
|
100
100
|
if (controlDescription === void 0) { controlDescription = ""; }
|
|
101
101
|
try {
|
|
102
|
-
var verificationResult = actual.trim().includes(expected.trim()) ? "PASSED" : "FAILED";
|
|
103
|
-
var logText = "VERIFICATION: ".concat(verificationResult, ". ").concat(controlDescription, " Actual: '").concat(actual, "' contains Expected: '").concat(expected.trim(), "'");
|
|
102
|
+
var verificationResult = actual.trim().includes(expected.trim()) ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
-
(0, logs_core_1.logError)("VERIFICATION: FAILED. Actual: '" + expected + "' contains Expected: '" + actual + "'");
|
|
108
|
+
(0, logs_core_1.logError)("VERIFICATION: '❌ FAILED'. Actual: '" + expected + "' contains Expected: '" + actual + "'");
|
|
109
109
|
throw error1;
|
|
110
110
|
}
|
|
111
111
|
};
|
|
@@ -132,12 +132,12 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
132
132
|
case 1:
|
|
133
133
|
_a.sent();
|
|
134
134
|
return [4 /*yield*/, this.isDisplayed(control).then(function (value) {
|
|
135
|
-
var verificationResult = value === expectedIsDisplayed ? "PASSED" : "FAILED";
|
|
136
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " '").concat(control.controlDescription, "' displayed status is '").concat(value, "' Expected: ").concat(expectedIsDisplayed);
|
|
135
|
+
var verificationResult = value === expectedIsDisplayed ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
-
(0, logs_core_1.logError)("VERIFICATION: FAILED. '" + control.controlDescription + "' displayed status is: '" + false + "' due to reason: " + reason);
|
|
140
|
+
(0, logs_core_1.logError)("VERIFICATION: '❌ FAILED'. '" + control.controlDescription + "' displayed status is: '" + false + "' due to reason: " + reason);
|
|
141
141
|
})];
|
|
142
142
|
case 2:
|
|
143
143
|
_a.sent();
|
|
@@ -175,8 +175,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
175
175
|
return [4 /*yield*/, control.controlLocator.isHidden().then(function (value) { return __awaiter(_this, void 0, void 0, function () {
|
|
176
176
|
var verificationResult, logText;
|
|
177
177
|
return __generator(this, function (_a) {
|
|
178
|
-
verificationResult = value === true ? "PASSED" : "FAILED";
|
|
179
|
-
logText = "VERIFICATION: ".concat(verificationResult, ". '").concat(control.controlDescription, "' hidden status is '").concat(value, "' Expected: true");
|
|
178
|
+
verificationResult = value === true ? "✅ PASSED" : "❌ FAILED";
|
|
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*/];
|
|
@@ -211,8 +211,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
211
211
|
case 0: return [4 /*yield*/, this.getAttributeValue(control, attributeName).then(function (value) { return __awaiter(_this, void 0, void 0, function () {
|
|
212
212
|
var verificationResult, logText;
|
|
213
213
|
return __generator(this, function (_a) {
|
|
214
|
-
verificationResult = (value === null || value === void 0 ? void 0 : value.trim()) === expectedAttributeValue ? "PASSED" : "FAILED";
|
|
215
|
-
logText = "VERIFICATION: ".concat(verificationResult, ". Attribute value of ").concat(control.controlDescription, " Expected: '").concat(expectedAttributeValue, "' Actual : '").concat(value, "'");
|
|
214
|
+
verificationResult = (value === null || value === void 0 ? void 0 : value.trim()) === expectedAttributeValue ? "✅ PASSED" : "❌ FAILED";
|
|
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*/];
|
|
@@ -250,8 +250,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
250
250
|
switch (_e.label) {
|
|
251
251
|
case 0:
|
|
252
252
|
if (!(value != null)) return [3 /*break*/, 2];
|
|
253
|
-
verificationResult = value.trim().includes(attributeValue) ? "PASSED" : "FAILED";
|
|
254
|
-
logText = "VERIFICATION: ".concat(verificationResult, ". Atribute value of ").concat(control.controlLocator, " Expected: '").concat(attributeValue, "' contains Actual : '").concat(value, "'");
|
|
253
|
+
verificationResult = value.trim().includes(attributeValue) ? "✅ PASSED" : "❌ FAILED";
|
|
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
256
|
_b = (_a = test_1.expect).soft;
|
|
257
257
|
return [4 /*yield*/, this.getAttributeValue(control, attributeName)];
|
|
@@ -259,11 +259,11 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
259
259
|
_b.apply(_a, [_e.sent(), logText]).toContain(attributeValue);
|
|
260
260
|
return [3 /*break*/, 4];
|
|
261
261
|
case 2:
|
|
262
|
-
(0, logs_core_1.logVerification)("VERIFICATION: FAILED. Expected: '".concat(attributeValue, "' does not contains Actual: '").concat(value, "'"));
|
|
262
|
+
(0, logs_core_1.logVerification)("VERIFICATION: '\u274C 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
|
-
_d.apply(_c, [_e.sent(), "VERIFICATION: FAILED. Expected: '".concat(attributeValue, "' does not contains Actual: '").concat(value, "'")]).toContain(attributeValue);
|
|
266
|
+
_d.apply(_c, [_e.sent(), "VERIFICATION: '\u274C FAILED'. Expected: '".concat(attributeValue, "' does not contains Actual: '").concat(value, "'")]).toContain(attributeValue);
|
|
267
267
|
_e.label = 4;
|
|
268
268
|
case 4: return [2 /*return*/];
|
|
269
269
|
}
|
|
@@ -300,8 +300,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
300
300
|
_a.sent();
|
|
301
301
|
_a.label = 2;
|
|
302
302
|
case 2: return [4 /*yield*/, control.controlLocator.first().isEnabled().then(function (value) {
|
|
303
|
-
var verificationResult = value === expValue ? "PASSED" : "FAILED";
|
|
304
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " '").concat(control.controlDescription, "' enabled status is: '").concat(value, "' Expected: ").concat(expValue);
|
|
303
|
+
var verificationResult = value === expValue ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -333,8 +333,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
333
333
|
_a.sent();
|
|
334
334
|
_a.label = 2;
|
|
335
335
|
case 2: return [4 /*yield*/, control.controlLocator.first().isChecked().then(function (isChecked) {
|
|
336
|
-
var verificationResult = isChecked === expValue ? "PASSED" : "FAILED";
|
|
337
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " '").concat(control.controlDescription, "' selected status is: '").concat(isChecked, "' Expected: ").concat(expValue);
|
|
336
|
+
var verificationResult = isChecked === expValue ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -362,7 +362,7 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
362
362
|
return __generator(this, function (_a) {
|
|
363
363
|
switch (_a.label) {
|
|
364
364
|
case 0: return [4 /*yield*/, this.getText(control).then(function (value) {
|
|
365
|
-
var verificationResult = (value === null || value === void 0 ? void 0 : value.trim()) === expectedText.trim() ? "PASSED" : "FAILED";
|
|
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());
|
|
@@ -391,8 +391,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
391
391
|
return __generator(this, function (_a) {
|
|
392
392
|
switch (_a.label) {
|
|
393
393
|
case 0: return [4 /*yield*/, this.getText(control).then(function (value) {
|
|
394
|
-
var verificationResult = (value === null || value === void 0 ? void 0 : value.trim().includes(expectedText.trim())) ? "PASSED" : "FAILED";
|
|
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(), "'");
|
|
394
|
+
var verificationResult = (value === null || value === void 0 ? void 0 : value.trim().includes(expectedText.trim())) ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -420,8 +420,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
420
420
|
return __generator(this, function (_a) {
|
|
421
421
|
switch (_a.label) {
|
|
422
422
|
case 0: return [4 /*yield*/, this.getText(control).then(function (value) {
|
|
423
|
-
var verificationResult = (value === null || value === void 0 ? void 0 : value.trim().includes(expectedText)) ? "PASSED" : "FAILED";
|
|
424
|
-
var logText = "VERIFICATION: ".concat(verificationResult, ". Verify text of ").concat(control.controlDescription, " Expected: '").concat(expectedText, "' does not contains Actual: '").concat(value, "'");
|
|
423
|
+
var verificationResult = (value === null || value === void 0 ? void 0 : value.trim().includes(expectedText)) ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -449,8 +449,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
449
449
|
return __generator(this, function (_a) {
|
|
450
450
|
switch (_a.label) {
|
|
451
451
|
case 0: return [4 /*yield*/, control.controlLocator.first().getAttribute("value").then(function (value) {
|
|
452
|
-
var verificationResult = (value === null || value === void 0 ? void 0 : value.trim()) === expectedText ? "PASSED" : "FAILED";
|
|
453
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " Verify textbox value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
452
|
+
var verificationResult = (value === null || value === void 0 ? void 0 : value.trim()) === expectedText ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -466,8 +466,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
466
466
|
return __generator(this, function (_a) {
|
|
467
467
|
switch (_a.label) {
|
|
468
468
|
case 0: return [4 /*yield*/, control.controlLocator.first().getAttribute("value").then(function (value) {
|
|
469
|
-
var verificationResult = (value === null || value === void 0 ? void 0 : value.trim().includes(expectedText)) ? "PASSED" : "FAILED";
|
|
470
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " Verify textbox value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
469
|
+
var verificationResult = (value === null || value === void 0 ? void 0 : value.trim().includes(expectedText)) ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -495,8 +495,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
495
495
|
return __generator(this, function (_a) {
|
|
496
496
|
switch (_a.label) {
|
|
497
497
|
case 0: return [4 /*yield*/, control.controlLocator.first().innerText().then(function (value) {
|
|
498
|
-
var verificationResult = value.trim() === expectedText ? "PASSED" : "FAILED";
|
|
499
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " Verify value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
498
|
+
var verificationResult = value.trim() === expectedText ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -512,8 +512,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
512
512
|
return __generator(this, function (_a) {
|
|
513
513
|
switch (_a.label) {
|
|
514
514
|
case 0: return [4 /*yield*/, control.controlLocator.first().innerText().then(function (value) {
|
|
515
|
-
var verificationResult = value.trim().includes(expectedText) ? "PASSED" : "FAILED";
|
|
516
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " Verify value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
515
|
+
var verificationResult = value.trim().includes(expectedText) ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -541,8 +541,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
541
541
|
return __generator(this, function (_a) {
|
|
542
542
|
switch (_a.label) {
|
|
543
543
|
case 0: return [4 /*yield*/, control.controlLocator.first().inputValue().then(function (value) {
|
|
544
|
-
var verificationResult = value.trim() === expectedText ? "PASSED" : "FAILED";
|
|
545
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " Verify value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
544
|
+
var verificationResult = value.trim() === expectedText ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -558,8 +558,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
558
558
|
return __generator(this, function (_a) {
|
|
559
559
|
switch (_a.label) {
|
|
560
560
|
case 0: return [4 /*yield*/, control.controlLocator.first().inputValue().then(function (value) {
|
|
561
|
-
var verificationResult = value.trim().includes(expectedText) ? "PASSED" : "FAILED";
|
|
562
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " Verify value of ").concat(control.controlDescription, ". Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
561
|
+
var verificationResult = value.trim().includes(expectedText) ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -587,8 +587,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
587
587
|
return __generator(this, function (_a) {
|
|
588
588
|
switch (_a.label) {
|
|
589
589
|
case 0: return [4 /*yield*/, this.isSelected(control).then(function (isChecked) {
|
|
590
|
-
var verificationResult = value === isChecked ? "PASSED" : "FAILED";
|
|
591
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " Verify checkbox value of ").concat(control.controlDescription, ". Expected: '").concat(value, "' Actual: '").concat(isChecked, "'");
|
|
590
|
+
var verificationResult = value === isChecked ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -624,8 +624,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
624
624
|
tagName = _a.sent();
|
|
625
625
|
_a.label = 2;
|
|
626
626
|
case 2:
|
|
627
|
-
verificationResult = (tagName === null || tagName === void 0 ? void 0 : tagName.toLowerCase()) == expectedTagName.toLowerCase() ? "PASSED" : "FAILED";
|
|
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(), "'");
|
|
627
|
+
verificationResult = (tagName === null || tagName === void 0 ? void 0 : tagName.toLowerCase()) == expectedTagName.toLowerCase() ? "✅ PASSED" : "❌ FAILED";
|
|
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*/];
|
|
@@ -657,8 +657,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
657
657
|
});
|
|
658
658
|
});
|
|
659
659
|
}).length;
|
|
660
|
-
verificationResult = count >= 1 ? "PASSED" : "FAILED";
|
|
661
|
-
(0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". '").concat(valueToVerify, "' is Present in list '").concat(control.controlDescription, "'"));
|
|
660
|
+
verificationResult = count >= 1 ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
}
|
|
@@ -701,8 +701,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
701
701
|
});
|
|
702
702
|
});
|
|
703
703
|
}).length;
|
|
704
|
-
verificationResult = count >= 1 ? "PASSED" : "FAILED";
|
|
705
|
-
(0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". '").concat(expectedValue, "' is Present in list '").concat(control.controlDescription, "'"));
|
|
704
|
+
verificationResult = count >= 1 ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
}
|
|
@@ -763,8 +763,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
763
763
|
});
|
|
764
764
|
});
|
|
765
765
|
}).length;
|
|
766
|
-
verificationResult = count >= 1 ? "PASSED" : "FAILED";
|
|
767
|
-
(0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". '").concat(expectedValue, "' is Present in list '").concat(control.controlDescription, "'"));
|
|
766
|
+
verificationResult = count >= 1 ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
}
|
|
@@ -797,8 +797,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
797
797
|
case 1:
|
|
798
798
|
_b.sent();
|
|
799
799
|
return [4 /*yield*/, list[i].innerText().then(function (value) {
|
|
800
|
-
var verificationResult = value.trim().includes(listOfValueToVerify[i]) ? "PASSED" : "FAILED";
|
|
801
|
-
(0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". Expected: '").concat(listOfValueToVerify[i], "' Actual: '").concat(value, "'"));
|
|
800
|
+
var verificationResult = value.trim().includes(listOfValueToVerify[i]) ? "✅ PASSED" : "❌ FAILED";
|
|
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:
|
|
@@ -839,8 +839,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
839
839
|
this.page.on('dialog', function (dialog) { return __awaiter(_this, void 0, void 0, function () {
|
|
840
840
|
var verificationResult, logText;
|
|
841
841
|
return __generator(this, function (_a) {
|
|
842
|
-
verificationResult = dialog.message().includes(expectedText) ? "PASSED" : "FAILED";
|
|
843
|
-
logText = "VERIFICATION: ".concat(verificationResult, " Verify alert text. Expected: '").concat(expectedText, "' Actual: '").concat(dialog.message(), "'");
|
|
842
|
+
verificationResult = dialog.message().includes(expectedText) ? "✅ PASSED" : "❌ FAILED";
|
|
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*/];
|
|
@@ -864,8 +864,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
864
864
|
return __generator(this, function (_a) {
|
|
865
865
|
switch (_a.label) {
|
|
866
866
|
case 0: return [4 /*yield*/, this.getURL().then(function (value) {
|
|
867
|
-
var verificationResult = value.includes(subString) ? "PASSED" : "FAILED";
|
|
868
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " Verify URL contains. Expected: '").concat(subString, "' Actual: '").concat(value, "'");
|
|
867
|
+
var verificationResult = value.includes(subString) ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -892,8 +892,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
892
892
|
return __generator(this, function (_a) {
|
|
893
893
|
switch (_a.label) {
|
|
894
894
|
case 0: return [4 /*yield*/, control.controlLocator.count().then(function (value) {
|
|
895
|
-
var verificationResult = value == expectedCount ? "PASSED" : "FAILED";
|
|
896
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " Verify count of elements of ").concat(control.controlDescription, ". Expected: '").concat(expectedCount, "' Actual: '").concat(value, "'");
|
|
895
|
+
var verificationResult = value == expectedCount ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -909,8 +909,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
909
909
|
return __generator(this, function (_a) {
|
|
910
910
|
switch (_a.label) {
|
|
911
911
|
case 0: return [4 /*yield*/, control.controlLocator.count().then(function (value) {
|
|
912
|
-
var verificationResult = value >= expectedCount ? "PASSED" : "FAILED";
|
|
913
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " Verify count of elements of ").concat(control.controlDescription, ". Expected: '").concat(expectedCount, "' Actual: '").concat(value, "'");
|
|
912
|
+
var verificationResult = value >= expectedCount ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -926,8 +926,8 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
926
926
|
return __generator(this, function (_a) {
|
|
927
927
|
switch (_a.label) {
|
|
928
928
|
case 0: return [4 /*yield*/, control.controlLocator.count().then(function (value) {
|
|
929
|
-
var verificationResult = value <= expectedCount ? "PASSED" : "FAILED";
|
|
930
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " Verify count of elements of ").concat(control.controlDescription, ". Expected: '").concat(expectedCount, "' Actual: '").concat(value, "'");
|
|
929
|
+
var verificationResult = value <= expectedCount ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
})];
|
|
@@ -955,19 +955,19 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
955
955
|
case 0:
|
|
956
956
|
_a.trys.push([0, 2, , 3]);
|
|
957
957
|
return [4 /*yield*/, this.page.title().then(function (value) {
|
|
958
|
-
var verificationResult = value.trim().includes(expectedText) ? "PASSED" : "FAILED";
|
|
959
|
-
var logText = "VERIFICATION: ".concat(verificationResult, " Verify title contains. Expected: '").concat(expectedText, "' Actual: '").concat(value, "'");
|
|
958
|
+
var verificationResult = value.trim().includes(expectedText) ? "✅ PASSED" : "❌ FAILED";
|
|
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
|
-
(0, logs_core_1.logError)('Error : ' + reason);
|
|
963
|
+
(0, logs_core_1.logError)('❌ Error : ' + reason);
|
|
964
964
|
})];
|
|
965
965
|
case 1:
|
|
966
966
|
_a.sent();
|
|
967
967
|
return [3 /*break*/, 3];
|
|
968
968
|
case 2:
|
|
969
969
|
error1_1 = _a.sent();
|
|
970
|
-
(0, logs_core_1.logError)("VERIFICATION: FAILED. Expected: '" + expectedText + "'is NOT present in title.");
|
|
970
|
+
(0, logs_core_1.logError)("VERIFICATION: '❌ FAILED'. Expected: '" + expectedText + "'is NOT present in title.");
|
|
971
971
|
throw error1_1;
|
|
972
972
|
case 3: return [2 /*return*/];
|
|
973
973
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playwright-ts-automationframework",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.56",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@playwright/test": "^1.52.0",
|
|
23
|
-
"@types/node": "^22.15.
|
|
23
|
+
"@types/node": "^22.15.19",
|
|
24
24
|
"log4js": "^6.9.1",
|
|
25
25
|
"nodemailer": "^7.0.3",
|
|
26
|
-
"npm": "^11.
|
|
26
|
+
"npm": "^11.4.0",
|
|
27
27
|
"path": "^0.12.7",
|
|
28
28
|
"typescript": "^5.8.3"
|
|
29
29
|
},
|