playwright-ts-automationframework 1.1.30 → 1.1.33
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
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
});
|
|
@@ -214,14 +214,24 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
214
214
|
*/
|
|
215
215
|
Assertion.prototype.verifyAttributeValue = function (control, attributeName, expectedAttributeValue) {
|
|
216
216
|
return __awaiter(this, void 0, void 0, function () {
|
|
217
|
+
var _this = this;
|
|
217
218
|
return __generator(this, function (_a) {
|
|
218
219
|
switch (_a.label) {
|
|
219
|
-
case 0: return [4 /*yield*/, this.getAttributeValue(control, attributeName).then(function (value) {
|
|
220
|
-
var verificationResult
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
220
|
+
case 0: return [4 /*yield*/, this.getAttributeValue(control, attributeName).then(function (value) { return __awaiter(_this, void 0, void 0, function () {
|
|
221
|
+
var verificationResult, logText;
|
|
222
|
+
return __generator(this, function (_a) {
|
|
223
|
+
switch (_a.label) {
|
|
224
|
+
case 0:
|
|
225
|
+
verificationResult = value === expectedAttributeValue ? "PASSED" : "FAILED";
|
|
226
|
+
logText = "VERIFICATION: ".concat(verificationResult, ". Attribute value of ").concat(control.controlDescription, " Expected: '").concat(expectedAttributeValue, "' Actual : '").concat(value, "'");
|
|
227
|
+
(0, logs_core_1.logVerification)(logText);
|
|
228
|
+
return [4 /*yield*/, (0, test_1.expect)(control.controlLocator.first(), logText).toHaveAttribute(expectedAttributeValue)];
|
|
229
|
+
case 1:
|
|
230
|
+
_a.sent();
|
|
231
|
+
return [2 /*return*/];
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
}); })];
|
|
225
235
|
case 1:
|
|
226
236
|
_a.sent();
|
|
227
237
|
return [2 /*return*/];
|