playwright-ts-automationframework 1.1.7 → 1.1.9
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.d.ts +2 -2
- package/lib/core/actions.core.js +21 -21
- package/lib/core/assertion.core.js +17 -17
- package/lib/core/basePage.core.js +8 -8
- package/lib/core/configuration.core.js +3 -14
- package/lib/core/global.setup.js +3 -4
- package/lib/core/global.tearDown.js +3 -4
- package/lib/core/logs.core.js +5 -6
- package/lib/core/sendEmail.js +2 -2
- package/package.json +6 -7
|
@@ -324,13 +324,13 @@ export declare class Actions extends BasePage {
|
|
|
324
324
|
/**
|
|
325
325
|
* Wait for execution to stop for given time
|
|
326
326
|
*
|
|
327
|
-
* @param
|
|
327
|
+
* @param milliseconds Time for which executed should halt in seconds
|
|
328
328
|
*
|
|
329
329
|
* Example:
|
|
330
330
|
*
|
|
331
331
|
* sleep(10);
|
|
332
332
|
*/
|
|
333
|
-
sleep(
|
|
333
|
+
sleep(milliseconds?: number): Promise<unknown>;
|
|
334
334
|
/**
|
|
335
335
|
* Close the browser instance
|
|
336
336
|
*
|
package/lib/core/actions.core.js
CHANGED
|
@@ -24,8 +24,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g =
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -78,7 +78,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
78
78
|
return __awaiter(this, void 0, void 0, function () {
|
|
79
79
|
return __generator(this, function (_a) {
|
|
80
80
|
switch (_a.label) {
|
|
81
|
-
case 0: return [4 /*yield*/, control.controlLocator.
|
|
81
|
+
case 0: return [4 /*yield*/, control.controlLocator.click().then(function () {
|
|
82
82
|
(0, logs_core_1.logAction)("Clicked on '" + control.controlDescription + "'");
|
|
83
83
|
}, function (error) {
|
|
84
84
|
(0, logs_core_1.errorLog)("Unable to click on '" + control.controlDescription + "'");
|
|
@@ -105,7 +105,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
105
105
|
return __awaiter(this, void 0, void 0, function () {
|
|
106
106
|
return __generator(this, function (_a) {
|
|
107
107
|
switch (_a.label) {
|
|
108
|
-
case 0: return [4 /*yield*/, control.controlLocator.
|
|
108
|
+
case 0: return [4 /*yield*/, control.controlLocator.hover().then(function () {
|
|
109
109
|
(0, logs_core_1.logAction)("Mouse hover to '" + control.controlDescription + "'");
|
|
110
110
|
}, function (error) {
|
|
111
111
|
(0, logs_core_1.errorLog)("Unable to mouse hover on :'" + control.controlDescription + "'");
|
|
@@ -133,7 +133,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
133
133
|
return __awaiter(this, void 0, void 0, function () {
|
|
134
134
|
return __generator(this, function (_a) {
|
|
135
135
|
switch (_a.label) {
|
|
136
|
-
case 0: return [4 /*yield*/, control.controlLocator.
|
|
136
|
+
case 0: return [4 /*yield*/, control.controlLocator.focus()];
|
|
137
137
|
case 1:
|
|
138
138
|
_a.sent();
|
|
139
139
|
return [4 /*yield*/, this.pressKeyboardEvent(control, action)];
|
|
@@ -159,7 +159,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
159
159
|
return __awaiter(this, void 0, void 0, function () {
|
|
160
160
|
return __generator(this, function (_a) {
|
|
161
161
|
switch (_a.label) {
|
|
162
|
-
case 0: return [4 /*yield*/, control.controlLocator.
|
|
162
|
+
case 0: return [4 /*yield*/, control.controlLocator.fill(textTobeEntered).then(function () {
|
|
163
163
|
if (control.controlDescription.trim().toLowerCase().endsWith('textbox')) {
|
|
164
164
|
(0, logs_core_1.logAction)("Entered '" + textTobeEntered + "' in '" + control.controlDescription + "'");
|
|
165
165
|
}
|
|
@@ -192,7 +192,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
192
192
|
return __awaiter(this, void 0, void 0, function () {
|
|
193
193
|
return __generator(this, function (_a) {
|
|
194
194
|
switch (_a.label) {
|
|
195
|
-
case 0: return [4 /*yield*/, control.controlLocator.
|
|
195
|
+
case 0: return [4 /*yield*/, control.controlLocator.press(key).then(function () {
|
|
196
196
|
(0, logs_core_1.logAction)("Press Key '" + key.toUpperCase() + "' on '" + control.controlDescription + "'");
|
|
197
197
|
})];
|
|
198
198
|
case 1:
|
|
@@ -217,7 +217,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
217
217
|
Actions.prototype.selectFromDropdownByValue = function (control, optionTobeSelcted) {
|
|
218
218
|
return __awaiter(this, void 0, void 0, function () {
|
|
219
219
|
return __generator(this, function (_a) {
|
|
220
|
-
control.controlLocator.
|
|
220
|
+
control.controlLocator.selectOption({ value: optionTobeSelcted }).then(function () {
|
|
221
221
|
(0, logs_core_1.logAction)("Selected '" + optionTobeSelcted + "' from '" + control.controlDescription + "'");
|
|
222
222
|
}, function () {
|
|
223
223
|
(0, logs_core_1.errorLog)("'Unable to select '" + optionTobeSelcted + "' from '" + control.controlDescription + "'");
|
|
@@ -241,7 +241,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
241
241
|
Actions.prototype.selectDropDownByText = function (control, optionTobeSelcted) {
|
|
242
242
|
return __awaiter(this, void 0, void 0, function () {
|
|
243
243
|
return __generator(this, function (_a) {
|
|
244
|
-
control.controlLocator.
|
|
244
|
+
control.controlLocator.selectOption({ label: optionTobeSelcted }).then(function () {
|
|
245
245
|
(0, logs_core_1.logAction)("Selected '" + optionTobeSelcted + "' from '" + control.controlDescription + "'");
|
|
246
246
|
}, function () {
|
|
247
247
|
(0, logs_core_1.errorLog)("'Unable to select '" + optionTobeSelcted + "' from '" + control.controlDescription + "'");
|
|
@@ -286,9 +286,9 @@ var Actions = /** @class */ (function (_super) {
|
|
|
286
286
|
*
|
|
287
287
|
* selectCheckbox(isMinorChkbx, true);
|
|
288
288
|
*/
|
|
289
|
-
Actions.prototype.selectCheckbox = function (
|
|
290
|
-
|
|
291
|
-
|
|
289
|
+
Actions.prototype.selectCheckbox = function (control_1) {
|
|
290
|
+
return __awaiter(this, arguments, void 0, function (control, expectedCheckboxValue) {
|
|
291
|
+
if (expectedCheckboxValue === void 0) { expectedCheckboxValue = true; }
|
|
292
292
|
return __generator(this, function (_a) {
|
|
293
293
|
switch (_a.label) {
|
|
294
294
|
case 0: return [4 /*yield*/, this.waitTillElementIsPresent(control)];
|
|
@@ -696,7 +696,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
696
696
|
case 0:
|
|
697
697
|
_a.trys.push([0, 2, , 3]);
|
|
698
698
|
return [4 /*yield*/, this.page.waitForURL(url, {
|
|
699
|
-
timeout:
|
|
699
|
+
timeout: 10000,
|
|
700
700
|
waitUntil: "load"
|
|
701
701
|
})];
|
|
702
702
|
case 1: return [2 /*return*/, _a.sent()];
|
|
@@ -732,7 +732,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
732
732
|
_a.trys.push([2, 4, , 5]);
|
|
733
733
|
return [4 /*yield*/, control.controlLocator.waitFor({
|
|
734
734
|
state: "visible",
|
|
735
|
-
timeout:
|
|
735
|
+
timeout: 10000
|
|
736
736
|
})];
|
|
737
737
|
case 3:
|
|
738
738
|
_a.sent();
|
|
@@ -769,7 +769,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
769
769
|
_a.trys.push([2, 4, , 5]);
|
|
770
770
|
return [4 /*yield*/, control.controlLocator.waitFor({
|
|
771
771
|
state: "attached",
|
|
772
|
-
timeout:
|
|
772
|
+
timeout: 10000
|
|
773
773
|
})];
|
|
774
774
|
case 3:
|
|
775
775
|
_a.sent();
|
|
@@ -802,7 +802,7 @@ var Actions = /** @class */ (function (_super) {
|
|
|
802
802
|
_a.trys.push([0, 2, , 3]);
|
|
803
803
|
return [4 /*yield*/, control.controlLocator.waitFor({
|
|
804
804
|
state: "hidden",
|
|
805
|
-
timeout:
|
|
805
|
+
timeout: 10000
|
|
806
806
|
})];
|
|
807
807
|
case 1:
|
|
808
808
|
_a.sent();
|
|
@@ -818,18 +818,18 @@ var Actions = /** @class */ (function (_super) {
|
|
|
818
818
|
/**
|
|
819
819
|
* Wait for execution to stop for given time
|
|
820
820
|
*
|
|
821
|
-
* @param
|
|
821
|
+
* @param milliseconds Time for which executed should halt in seconds
|
|
822
822
|
*
|
|
823
823
|
* Example:
|
|
824
824
|
*
|
|
825
825
|
* sleep(10);
|
|
826
826
|
*/
|
|
827
|
-
Actions.prototype.sleep = function (
|
|
828
|
-
|
|
829
|
-
|
|
827
|
+
Actions.prototype.sleep = function () {
|
|
828
|
+
return __awaiter(this, arguments, void 0, function (milliseconds) {
|
|
829
|
+
if (milliseconds === void 0) { milliseconds = 5; }
|
|
830
830
|
return __generator(this, function (_a) {
|
|
831
831
|
switch (_a.label) {
|
|
832
|
-
case 0: return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve,
|
|
832
|
+
case 0: return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, milliseconds * 1000); })];
|
|
833
833
|
case 1: return [2 /*return*/, _a.sent()];
|
|
834
834
|
}
|
|
835
835
|
});
|
|
@@ -24,8 +24,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g =
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -118,9 +118,9 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
118
118
|
*
|
|
119
119
|
* verifyIsEnabled(loginBtn, true);
|
|
120
120
|
*/
|
|
121
|
-
Assertion.prototype.verifyIsDisplayed = function (
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
Assertion.prototype.verifyIsDisplayed = function (control_1) {
|
|
122
|
+
return __awaiter(this, arguments, void 0, function (control, expectedIsDisplayed) {
|
|
123
|
+
if (expectedIsDisplayed === void 0) { expectedIsDisplayed = true; }
|
|
124
124
|
return __generator(this, function (_a) {
|
|
125
125
|
switch (_a.label) {
|
|
126
126
|
case 0:
|
|
@@ -158,11 +158,11 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
158
158
|
*
|
|
159
159
|
* verifyIsNotDisplayed(loginBtn, true);
|
|
160
160
|
*/
|
|
161
|
-
Assertion.prototype.verifyIsNotDisplayed = function (
|
|
162
|
-
|
|
163
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
161
|
+
Assertion.prototype.verifyIsNotDisplayed = function (control_1) {
|
|
162
|
+
return __awaiter(this, arguments, void 0, function (control, isAlreadyHidden) {
|
|
164
163
|
var element;
|
|
165
164
|
var _this = this;
|
|
165
|
+
if (isAlreadyHidden === void 0) { isAlreadyHidden = false; }
|
|
166
166
|
return __generator(this, function (_a) {
|
|
167
167
|
switch (_a.label) {
|
|
168
168
|
case 0:
|
|
@@ -226,9 +226,9 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
226
226
|
*
|
|
227
227
|
* verifyIsEnabled(loginBtn, true);
|
|
228
228
|
*/
|
|
229
|
-
Assertion.prototype.verifyIsEnabled = function (
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
Assertion.prototype.verifyIsEnabled = function (control_1) {
|
|
230
|
+
return __awaiter(this, arguments, void 0, function (control, expValue) {
|
|
231
|
+
if (expValue === void 0) { expValue = true; }
|
|
232
232
|
return __generator(this, function (_a) {
|
|
233
233
|
switch (_a.label) {
|
|
234
234
|
case 0:
|
|
@@ -493,10 +493,10 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
493
493
|
});
|
|
494
494
|
});
|
|
495
495
|
};
|
|
496
|
-
Assertion.prototype.verifyListContainsMultipleValues = function (
|
|
497
|
-
|
|
498
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
496
|
+
Assertion.prototype.verifyListContainsMultipleValues = function (control_1, listOfValueToVerify_1) {
|
|
497
|
+
return __awaiter(this, arguments, void 0, function (control, listOfValueToVerify, waitTillElementIsDisplayed) {
|
|
499
498
|
var _this = this;
|
|
499
|
+
if (waitTillElementIsDisplayed === void 0) { waitTillElementIsDisplayed = true; }
|
|
500
500
|
return __generator(this, function (_a) {
|
|
501
501
|
switch (_a.label) {
|
|
502
502
|
case 0:
|
|
@@ -541,10 +541,10 @@ var Assertion = /** @class */ (function (_super) {
|
|
|
541
541
|
});
|
|
542
542
|
});
|
|
543
543
|
};
|
|
544
|
-
Assertion.prototype.verifyListForMultipleValues = function (
|
|
545
|
-
|
|
546
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
544
|
+
Assertion.prototype.verifyListForMultipleValues = function (control_1, listOfValueToVerify_1) {
|
|
545
|
+
return __awaiter(this, arguments, void 0, function (control, listOfValueToVerify, waitTillElementIsDisplayed) {
|
|
547
546
|
var list, _loop_1, i;
|
|
547
|
+
if (waitTillElementIsDisplayed === void 0) { waitTillElementIsDisplayed = true; }
|
|
548
548
|
return __generator(this, function (_a) {
|
|
549
549
|
switch (_a.label) {
|
|
550
550
|
case 0:
|
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g =
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -52,14 +52,14 @@ var BasePage = /** @class */ (function () {
|
|
|
52
52
|
* given environment(ExecutionSettings.json)
|
|
53
53
|
* and URL provided in AppConfigurations.json
|
|
54
54
|
*/
|
|
55
|
-
BasePage.prototype.initializeBrowser = function (
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
BasePage.prototype.initializeBrowser = function () {
|
|
56
|
+
return __awaiter(this, arguments, void 0, function (url) {
|
|
57
|
+
if (url === void 0) { url = configuration_core_1.Configuration.get("URL"); }
|
|
58
58
|
return __generator(this, function (_a) {
|
|
59
59
|
switch (_a.label) {
|
|
60
60
|
case 0: return [4 /*yield*/, this.page.goto(url, {
|
|
61
61
|
waitUntil: "load",
|
|
62
|
-
timeout:
|
|
62
|
+
timeout: 20000
|
|
63
63
|
}).then(function () {
|
|
64
64
|
(0, logs_core_1.logAction)("Navigated to URL: " + url);
|
|
65
65
|
})];
|
|
@@ -72,9 +72,9 @@ var BasePage = /** @class */ (function () {
|
|
|
72
72
|
};
|
|
73
73
|
BasePage.setTestCaseID = function (testInfo, testCaseID) {
|
|
74
74
|
if (testCaseID === void 0) { testCaseID = 0; }
|
|
75
|
-
|
|
75
|
+
testInfo.testId = testCaseID.toString();
|
|
76
76
|
(0, logs_core_1.logTestResult)('');
|
|
77
|
-
(0, logs_core_1.logTestResult)("===== START Of Execution For TestCase ID: " +
|
|
77
|
+
(0, logs_core_1.logTestResult)("===== START Of Execution For TestCase ID: " + testCaseID + " Title: '" + testInfo.title + "' ======");
|
|
78
78
|
(0, logs_core_1.logTestResult)('');
|
|
79
79
|
};
|
|
80
80
|
BasePage.executionCompleted = function (testinfo) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Configuration = void 0;
|
|
4
|
-
var automationSettings = require(
|
|
5
|
-
var appConfigurations = require(
|
|
4
|
+
var automationSettings = require('../../../../ExecutionSettings.json');
|
|
5
|
+
var appConfigurations = require('../../../../AppConfigurations.json');
|
|
6
6
|
/**
|
|
7
7
|
* Class to initilize all variables required for execution
|
|
8
8
|
* @author Ketan Pardeshi
|
|
@@ -52,18 +52,7 @@ var Configuration = /** @class */ (function () {
|
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(Configuration, "configurationData", {
|
|
54
54
|
get: function () {
|
|
55
|
-
|
|
56
|
-
return appConfigurations.QA;
|
|
57
|
-
}
|
|
58
|
-
else if (Configuration.environment.toUpperCase().includes("STAG")) {
|
|
59
|
-
return appConfigurations.STAGE;
|
|
60
|
-
}
|
|
61
|
-
else if (Configuration.environment.toUpperCase().includes("PROD")) {
|
|
62
|
-
return appConfigurations.PROD;
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
return appConfigurations.QA;
|
|
66
|
-
}
|
|
55
|
+
return appConfigurations[Configuration.environment];
|
|
67
56
|
},
|
|
68
57
|
enumerable: false,
|
|
69
58
|
configurable: true
|
package/lib/core/global.setup.js
CHANGED
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g =
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.globalSetup =
|
|
39
|
+
exports.globalSetup = globalSetup;
|
|
40
40
|
var promises_1 = require("node:fs/promises");
|
|
41
41
|
function globalSetup(config) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -57,5 +57,4 @@ function globalSetup(config) {
|
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
exports.globalSetup = globalSetup;
|
|
61
60
|
exports.default = globalSetup;
|
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g =
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.globalTearDown =
|
|
39
|
+
exports.globalTearDown = globalTearDown;
|
|
40
40
|
var sendEmail_1 = require("./sendEmail");
|
|
41
41
|
function globalTearDown(config) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -53,5 +53,4 @@ function globalTearDown(config) {
|
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
exports.globalTearDown = globalTearDown;
|
|
57
56
|
exports.default = globalTearDown;
|
package/lib/core/logs.core.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.logAction = logAction;
|
|
4
|
+
exports.logVerification = logVerification;
|
|
5
|
+
exports.errorLog = errorLog;
|
|
6
|
+
exports.consoleLog = consoleLog;
|
|
7
|
+
exports.logTestResult = logTestResult;
|
|
4
8
|
var log4js = require('log4js');
|
|
5
9
|
var dateTimeStamp = getCurrentDateTimeWithHHMM();
|
|
6
10
|
var logFileName = './Logs/ExecutionLogs.log';
|
|
@@ -22,26 +26,21 @@ function logAction(message) {
|
|
|
22
26
|
console.log("ACTION: " + message);
|
|
23
27
|
logger.info("ACTION: " + message);
|
|
24
28
|
}
|
|
25
|
-
exports.logAction = logAction;
|
|
26
29
|
function logVerification(message) {
|
|
27
30
|
console.log(message);
|
|
28
31
|
logger.info(message);
|
|
29
32
|
}
|
|
30
|
-
exports.logVerification = logVerification;
|
|
31
33
|
function errorLog(message) {
|
|
32
34
|
console.log('ERROR: ' + message);
|
|
33
35
|
logger.error('ERROR: ' + message);
|
|
34
36
|
}
|
|
35
|
-
exports.errorLog = errorLog;
|
|
36
37
|
function consoleLog(message) {
|
|
37
38
|
console.log("INFO: " + message);
|
|
38
39
|
}
|
|
39
|
-
exports.consoleLog = consoleLog;
|
|
40
40
|
function logTestResult(message) {
|
|
41
41
|
console.log(message);
|
|
42
42
|
logger.info(message);
|
|
43
43
|
}
|
|
44
|
-
exports.logTestResult = logTestResult;
|
|
45
44
|
function getCurrentDateTimeWithHHMM() {
|
|
46
45
|
var now = new Date();
|
|
47
46
|
var year = now.getFullYear();
|
package/lib/core/sendEmail.js
CHANGED
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g =
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playwright-ts-automationframework",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -19,14 +19,13 @@
|
|
|
19
19
|
"ignore-case": "^0.1.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@playwright/test": "^1.
|
|
23
|
-
"@types/node": "^20.
|
|
22
|
+
"@playwright/test": "^1.47.2",
|
|
23
|
+
"@types/node": "^20.16.9",
|
|
24
24
|
"log4js": "^6.9.1",
|
|
25
|
-
"nodemailer": "^6.9.
|
|
26
|
-
"npm": "^10.
|
|
25
|
+
"nodemailer": "^6.9.15",
|
|
26
|
+
"npm": "^10.8.3",
|
|
27
27
|
"path": "^0.12.7",
|
|
28
|
-
"
|
|
29
|
-
"typescript": "^5.3.3"
|
|
28
|
+
"typescript": "^5.6.2"
|
|
30
29
|
},
|
|
31
30
|
"files": [
|
|
32
31
|
"lib/**/**"
|