@auxcode/auxta 1.3.107-beta.0 → 1.3.107
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.
|
@@ -15,7 +15,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.getVerifyReceivedEmail = exports.postNotificationsOnFail = exports.postNotifications = exports.compareScreenshots = exports.getLastDayResults = exports.getReport = exports.updateReport = exports.uploadScenario = exports.uploadStep = exports.createEmptyReport = exports.setEmailProvider = exports.setTimeZone = void 0;
|
|
16
16
|
const axios_1 = __importDefault(require("axios"));
|
|
17
17
|
const config_1 = require("../configs/config");
|
|
18
|
-
const isManualChecklist = process.argv.includes('--create-manual-checklist');
|
|
19
18
|
function headers(token) {
|
|
20
19
|
return {
|
|
21
20
|
headers: {
|
|
@@ -83,8 +82,7 @@ function createEmptyReport(body) {
|
|
|
83
82
|
bucket: body.bucket,
|
|
84
83
|
start: moment().tz(config_1.config.timezone),
|
|
85
84
|
emailProvider: config_1.config.emailProvider,
|
|
86
|
-
url: body.baseUrl
|
|
87
|
-
isManualChecklist
|
|
85
|
+
url: body.baseUrl
|
|
88
86
|
}, headers(token))).data.reportId;
|
|
89
87
|
});
|
|
90
88
|
}
|
|
@@ -139,8 +137,7 @@ function uploadScenario(stepRes, scenarioName, uri, hasFailed) {
|
|
|
139
137
|
uri: uri
|
|
140
138
|
},
|
|
141
139
|
scenarios: stepRes,
|
|
142
|
-
hasFailed: hasFailed
|
|
143
|
-
isManualChecklist
|
|
140
|
+
hasFailed: hasFailed
|
|
144
141
|
}, headers(token))).data;
|
|
145
142
|
});
|
|
146
143
|
}
|
|
@@ -26,7 +26,7 @@ class FunctionHelper extends extend_default_page_1.ExtendDefaultPage {
|
|
|
26
26
|
log_service_1.default.push(keyword, log_service_1.default.tag, name, status, screenshot);
|
|
27
27
|
}
|
|
28
28
|
setTag(tag) {
|
|
29
|
-
if (!log_service_1.default.tag || log_service_1.default.tag === 'default') {
|
|
29
|
+
if (!log_service_1.default.tag || log_service_1.default.tag === '' || log_service_1.default.tag === 'default') {
|
|
30
30
|
log_service_1.default.tag = tag;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -16,7 +16,6 @@ exports.ExtendDefaultPage = void 0;
|
|
|
16
16
|
const log_service_1 = __importDefault(require("../../auxta/services/log.service"));
|
|
17
17
|
const status_of_step_1 = require("../../auxta/enums/status-of.step");
|
|
18
18
|
const config_1 = require("../../auxta/configs/config");
|
|
19
|
-
const isManualChecklist = process.argv.includes('--create-manual-checklist');
|
|
20
19
|
class ExtendDefaultPage {
|
|
21
20
|
constructor() {
|
|
22
21
|
this.defaultTimeout = config_1.config.timeout;
|
|
@@ -27,9 +26,7 @@ class ExtendDefaultPage {
|
|
|
27
26
|
const { goto: original_goto, click: original_click, type: original_type, waitForNetworkIdle: original_waitForNetworkIdle } = page;
|
|
28
27
|
page.goto = function goto(url, options) {
|
|
29
28
|
log_service_1.default.push('Then', log_service_1.default.tag, `I go to the '${url}' page`, status_of_step_1.StatusOfStep.PASSED);
|
|
30
|
-
|
|
31
|
-
return original_goto.apply(page, arguments);
|
|
32
|
-
}
|
|
29
|
+
return original_goto.apply(page, arguments);
|
|
33
30
|
};
|
|
34
31
|
page.click = function click(selector, options) {
|
|
35
32
|
return __awaiter(this, arguments, void 0, function* () {
|
|
@@ -40,17 +37,13 @@ class ExtendDefaultPage {
|
|
|
40
37
|
let elementName = yield page.$eval(selector, (e) => e.textContent);
|
|
41
38
|
if (!elementName || elementName === ' ')
|
|
42
39
|
elementName = selector;
|
|
43
|
-
|
|
44
|
-
yield original_click.apply(page, arguments);
|
|
45
|
-
}
|
|
40
|
+
yield original_click.apply(page, arguments);
|
|
46
41
|
log_service_1.default.push('Then', log_service_1.default.tag, `I click on the '${elementName}'`, status_of_step_1.StatusOfStep.PASSED);
|
|
47
42
|
}
|
|
48
43
|
catch (e) {
|
|
49
44
|
const msg = `I click on the '${selector}'`;
|
|
50
45
|
log_service_1.default.push('Then', log_service_1.default.tag, msg, status_of_step_1.StatusOfStep.FAILED);
|
|
51
|
-
|
|
52
|
-
throw new Error(msg);
|
|
53
|
-
}
|
|
46
|
+
throw new Error(msg);
|
|
54
47
|
}
|
|
55
48
|
});
|
|
56
49
|
};
|
|
@@ -59,16 +52,12 @@ class ExtendDefaultPage {
|
|
|
59
52
|
let message = 'I wait for the page to load';
|
|
60
53
|
let result;
|
|
61
54
|
try {
|
|
62
|
-
|
|
63
|
-
result = yield original_waitForNetworkIdle.apply(page, arguments);
|
|
64
|
-
}
|
|
55
|
+
result = yield original_waitForNetworkIdle.apply(page, arguments);
|
|
65
56
|
log_service_1.default.push('Then', log_service_1.default.tag, message, status_of_step_1.StatusOfStep.PASSED);
|
|
66
57
|
}
|
|
67
58
|
catch (e) {
|
|
68
59
|
log_service_1.default.push('Then', log_service_1.default.tag, message, status_of_step_1.StatusOfStep.FAILED);
|
|
69
|
-
|
|
70
|
-
throw new Error(message);
|
|
71
|
-
}
|
|
60
|
+
throw new Error(message);
|
|
72
61
|
}
|
|
73
62
|
return result;
|
|
74
63
|
});
|
|
@@ -79,9 +68,7 @@ class ExtendDefaultPage {
|
|
|
79
68
|
yield page.waitForSelector(field, {
|
|
80
69
|
timeout: time
|
|
81
70
|
});
|
|
82
|
-
|
|
83
|
-
yield original_type.apply(page, arguments);
|
|
84
|
-
}
|
|
71
|
+
yield original_type.apply(page, arguments);
|
|
85
72
|
let elementName = yield page.$eval(field, (e) => e.textContent);
|
|
86
73
|
if (!elementName || elementName === ' ')
|
|
87
74
|
elementName = field;
|
|
@@ -90,9 +77,7 @@ class ExtendDefaultPage {
|
|
|
90
77
|
catch (e) {
|
|
91
78
|
const msg = `I type '${value}' into the '${field}' field`;
|
|
92
79
|
log_service_1.default.push('Then', log_service_1.default.tag, msg, status_of_step_1.StatusOfStep.FAILED);
|
|
93
|
-
|
|
94
|
-
throw new Error(msg);
|
|
95
|
-
}
|
|
80
|
+
throw new Error(msg);
|
|
96
81
|
}
|
|
97
82
|
});
|
|
98
83
|
};
|