playwright-ts-automationframework 1.1.31 → 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/assertion.core.js +16 -6
- package/package.json +1 -1
|
@@ -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*/];
|