playwright-ts-automationframework 1.1.27 → 1.1.28
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.
|
@@ -17,7 +17,7 @@ export declare class Assertion extends Actions {
|
|
|
17
17
|
*
|
|
18
18
|
* verifyIsEquals("Invalid username", "Invalid username");
|
|
19
19
|
*/
|
|
20
|
-
verifyIsEquals(object1: any, object2: any): void;
|
|
20
|
+
verifyIsEquals(object1: any, object2: any, controlDescription?: string): void;
|
|
21
21
|
/**
|
|
22
22
|
* Verify first value contains substring as second.
|
|
23
23
|
* If expected value is present in actual value then test case gets passsed else failed..
|
|
@@ -28,7 +28,7 @@ export declare class Assertion extends Actions {
|
|
|
28
28
|
*
|
|
29
29
|
* verifyIsContains("Invalid username Test", "Invalid username");
|
|
30
30
|
*/
|
|
31
|
-
verifyIsContains(actual: string, expected: string): void;
|
|
31
|
+
verifyIsContains(actual: string, expected: string, controlDescription?: string): void;
|
|
32
32
|
/**
|
|
33
33
|
* Verify element's displayed/not displayed status as per expected value
|
|
34
34
|
* If expected element's displayed status is as per expected then test case gets passed else failed..
|
|
@@ -74,10 +74,11 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
74
74
|
*
|
|
75
75
|
* verifyIsEquals("Invalid username", "Invalid username");
|
|
76
76
|
*/
|
|
77
|
-
Assertion.prototype.verifyIsEquals = function (object1, object2) {
|
|
77
|
+
Assertion.prototype.verifyIsEquals = function (object1, object2, controlDescription) {
|
|
78
|
+
if (controlDescription === void 0) { controlDescription = ""; }
|
|
78
79
|
try {
|
|
79
80
|
var verificationResult = object1 === object2 ? "PASSED" : "FAILED";
|
|
80
|
-
(0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". Expected: '").concat(object1, "' Actual: '").concat(object2, "'"));
|
|
81
|
+
(0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". ").concat(controlDescription, " Expected: '").concat(object1, "' Actual: '").concat(object2, "'"));
|
|
81
82
|
(0, test_1.expect)(object1).toBe(object2);
|
|
82
83
|
}
|
|
83
84
|
catch (error1) {
|
|
@@ -95,10 +96,11 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
95
96
|
*
|
|
96
97
|
* verifyIsContains("Invalid username Test", "Invalid username");
|
|
97
98
|
*/
|
|
98
|
-
Assertion.prototype.verifyIsContains = function (actual, expected) {
|
|
99
|
+
Assertion.prototype.verifyIsContains = function (actual, expected, controlDescription) {
|
|
100
|
+
if (controlDescription === void 0) { controlDescription = ""; }
|
|
99
101
|
try {
|
|
100
102
|
var verificationResult = actual.trim().includes(expected.trim()) ? "PASSED" : "FAILED";
|
|
101
|
-
var logText = "VERIFICATION: ".concat(verificationResult, ". Actual: '").concat(actual, "' contains Expected: '").concat(expected.trim(), "'");
|
|
103
|
+
var logText = "VERIFICATION: ".concat(verificationResult, ". ").concat(controlDescription, " Actual: '").concat(actual, "' contains Expected: '").concat(expected.trim(), "'");
|
|
102
104
|
(0, logs_core_1.logVerification)(logText);
|
|
103
105
|
(0, test_1.expect)(actual.trim(), logText).toContain(expected.trim());
|
|
104
106
|
}
|