playwright-ts-automationframework 1.1.56 → 1.1.57

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.
@@ -816,7 +816,7 @@ var Actions = /** @class */ (function (_super) {
816
816
  Actions.prototype.waitTillPageURLContains = function (url_1) {
817
817
  return __awaiter(this, arguments, void 0, function (url, timeoutInSeconds) {
818
818
  var error_5;
819
- if (timeoutInSeconds === void 0) { timeoutInSeconds = 30; }
819
+ if (timeoutInSeconds === void 0) { timeoutInSeconds = 60; }
820
820
  return __generator(this, function (_a) {
821
821
  switch (_a.label) {
822
822
  case 0:
@@ -848,7 +848,7 @@ var Actions = /** @class */ (function (_super) {
848
848
  Actions.prototype.waitTillElementIsPresent = function (control_1) {
849
849
  return __awaiter(this, arguments, void 0, function (control, timeoutInSeconds) {
850
850
  var error_6;
851
- if (timeoutInSeconds === void 0) { timeoutInSeconds = 30; }
851
+ if (timeoutInSeconds === void 0) { timeoutInSeconds = 60; }
852
852
  return __generator(this, function (_a) {
853
853
  switch (_a.label) {
854
854
  case 0: return [4 /*yield*/, this.page.waitForLoadState("domcontentloaded")];
@@ -886,7 +886,7 @@ var Actions = /** @class */ (function (_super) {
886
886
  Actions.prototype.waitTillElementIsAttached = function (control_1) {
887
887
  return __awaiter(this, arguments, void 0, function (control, timeoutInSeconds) {
888
888
  var error_7;
889
- if (timeoutInSeconds === void 0) { timeoutInSeconds = 30; }
889
+ if (timeoutInSeconds === void 0) { timeoutInSeconds = 60; }
890
890
  return __generator(this, function (_a) {
891
891
  switch (_a.label) {
892
892
  case 0: return [4 /*yield*/, this.page.waitForLoadState("domcontentloaded")];
@@ -924,7 +924,7 @@ var Actions = /** @class */ (function (_super) {
924
924
  Actions.prototype.waitTillElementIsNotPresent = function (control_1) {
925
925
  return __awaiter(this, arguments, void 0, function (control, timeoutInSeconds) {
926
926
  var error_8;
927
- if (timeoutInSeconds === void 0) { timeoutInSeconds = 30; }
927
+ if (timeoutInSeconds === void 0) { timeoutInSeconds = 60; }
928
928
  return __generator(this, function (_a) {
929
929
  switch (_a.label) {
930
930
  case 0:
@@ -18,6 +18,7 @@ export declare class Assertion extends Actions {
18
18
  * verifyIsEquals("Invalid username", "Invalid username");
19
19
  */
20
20
  verifyIsEquals(object1: any, object2: any, controlDescription?: string): void;
21
+ verifyIsEqualIgnorecase(object1: any, object2: any, controlDescription?: string, caseInsensitive?: boolean): void;
21
22
  /**
22
23
  * Verify first value contains substring as second.
23
24
  * If expected value is present in actual value then test case gets passed else failed..
@@ -86,6 +86,31 @@ var Assertion = /** @class */ (function (_super) {
86
86
  throw error1;
87
87
  }
88
88
  };
89
+ Assertion.prototype.verifyIsEqualIgnorecase = function (object1, object2, controlDescription, caseInsensitive) {
90
+ if (controlDescription === void 0) { controlDescription = ""; }
91
+ if (caseInsensitive === void 0) { caseInsensitive = false; }
92
+ try {
93
+ var expected = object1;
94
+ var actual = object2;
95
+ if (caseInsensitive && typeof object1 === 'string' && typeof object2 === 'string') {
96
+ expected = object1.toLowerCase();
97
+ actual = object2.toLowerCase();
98
+ }
99
+ var verificationResult = expected === actual ? "✅ PASSED" : "❌ FAILED";
100
+ (0, logs_core_1.logVerification)("VERIFICATION: ".concat(verificationResult, ". ").concat(controlDescription, " Expected: '").concat(object1, "' Actual: '").concat(object2, "'"));
101
+ // Perform assertion based on case sensitivity
102
+ if (caseInsensitive && typeof object1 === 'string' && typeof object2 === 'string') {
103
+ test_1.expect.soft(object1.toLowerCase()).toEqual(object2.toLowerCase());
104
+ }
105
+ else {
106
+ test_1.expect.soft(object1).toEqual(object2);
107
+ }
108
+ }
109
+ catch (error1) {
110
+ (0, logs_core_1.logError)("VERIFICATION: '❌ FAILED'. Expected: '" + object1 + "' Actual: '" + object2 + "'");
111
+ throw error1;
112
+ }
113
+ };
89
114
  /**
90
115
  * Verify first value contains substring as second.
91
116
  * If expected value is present in actual value then test case gets passed else failed..
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright-ts-automationframework",
3
- "version": "1.1.56",
3
+ "version": "1.1.57",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",