playwright-ts-automationframework 1.1.64 → 1.1.68
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.
|
|
@@ -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:
|
|
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
|
-
|
|
338
|
+
_a.label = 2;
|
|
338
339
|
case 2:
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
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
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playwright-ts-automationframework",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.68",
|
|
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
|
+
"@playwright/test": "^1.58.2",
|
|
23
|
+
"@types/node": "^25.3.5",
|
|
24
24
|
"log4js": "^6.9.1",
|
|
25
|
-
"nodemailer": "^
|
|
26
|
-
"npm": "^11.
|
|
25
|
+
"nodemailer": "^8.0.1",
|
|
26
|
+
"npm": "^11.11.0",
|
|
27
27
|
"path": "^0.12.7",
|
|
28
|
-
"typescript": "^5.9.
|
|
28
|
+
"typescript": "^5.9.3"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"lib/**/**"
|