@auxcode/auxta 1.3.104 → 1.3.106
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/build/AuxTA.d.ts +1 -0
- package/build/AuxTA.js +2 -0
- package/build/auxta/configs/config.d.ts +3 -0
- package/build/auxta/configs/config.js +6 -4
- package/build/auxta/enums/status-of.step.d.ts +2 -1
- package/build/auxta/enums/status-of.step.js +1 -0
- package/build/auxta/hooks/report.hook.js +2 -1
- package/build/auxta/services/log.service.d.ts +1 -0
- package/build/auxta/services/log.service.js +4 -2
- package/build/auxta/services/report.service.d.ts +3 -1
- package/build/auxta/services/report.service.js +15 -3
- package/build/macros/helpers/code.helper.js +3 -1
- package/package.json +1 -1
package/build/AuxTA.d.ts
CHANGED
package/build/AuxTA.js
CHANGED
|
@@ -115,6 +115,8 @@ class AuxTA extends code_helper_1.FunctionHelper {
|
|
|
115
115
|
this.uploadModel.reportId = yield (0, report_service_1.createEmptyReport)(this.uploadModel);
|
|
116
116
|
this.uploadModel.currentSuite = fileName;
|
|
117
117
|
this.uploadModel.nextSuites = [];
|
|
118
|
+
yield (0, report_service_1.setTimeZone)();
|
|
119
|
+
yield (0, report_service_1.setEmailProvider)();
|
|
118
120
|
}
|
|
119
121
|
return this.puppeteer.run(event, callback, feature, scenario);
|
|
120
122
|
});
|
|
@@ -17,6 +17,7 @@ export declare function setupConfig(jsonConfig: any): {
|
|
|
17
17
|
password: string;
|
|
18
18
|
};
|
|
19
19
|
timezone: string;
|
|
20
|
+
emailProvider: string;
|
|
20
21
|
};
|
|
21
22
|
export declare function setupOverrideConfig(overrideConfig: any): {
|
|
22
23
|
auxtaURL: string;
|
|
@@ -37,6 +38,7 @@ export declare function setupOverrideConfig(overrideConfig: any): {
|
|
|
37
38
|
password: string;
|
|
38
39
|
};
|
|
39
40
|
timezone: string;
|
|
41
|
+
emailProvider: string;
|
|
40
42
|
};
|
|
41
43
|
export declare let config: {
|
|
42
44
|
auxtaURL: string;
|
|
@@ -57,4 +59,5 @@ export declare let config: {
|
|
|
57
59
|
password: string;
|
|
58
60
|
};
|
|
59
61
|
timezone: string;
|
|
62
|
+
emailProvider: string;
|
|
60
63
|
};
|
|
@@ -8,9 +8,10 @@ function setupConfig(jsonConfig) {
|
|
|
8
8
|
if (!jsonConfig.auxtaURL)
|
|
9
9
|
throw new Error("auxtaURL missing");
|
|
10
10
|
exports.config.auxtaURL = jsonConfig.auxtaURL;
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
if (jsonConfig.emailProvider)
|
|
12
|
+
exports.config.emailProvider = jsonConfig.emailProvider;
|
|
13
|
+
if (jsonConfig.timezone)
|
|
14
|
+
exports.config.timezone = jsonConfig.timezone;
|
|
14
15
|
if (!jsonConfig.digitalProduct)
|
|
15
16
|
throw new Error("digitalProduct");
|
|
16
17
|
exports.config.digitalProduct = jsonConfig.digitalProduct;
|
|
@@ -72,5 +73,6 @@ exports.config = {
|
|
|
72
73
|
email: "",
|
|
73
74
|
password: "",
|
|
74
75
|
},
|
|
75
|
-
timezone: ""
|
|
76
|
+
timezone: "Europe/Brussels",
|
|
77
|
+
emailProvider: "Mailgun"
|
|
76
78
|
};
|
|
@@ -8,5 +8,6 @@ var StatusOfStep;
|
|
|
8
8
|
StatusOfStep["SKIPPED"] = "skipped";
|
|
9
9
|
StatusOfStep["SUGGESTION"] = "suggestion";
|
|
10
10
|
StatusOfStep["PERFORMANCE_FAIL"] = "performanceFailure";
|
|
11
|
+
StatusOfStep["LOG"] = "log";
|
|
11
12
|
})(StatusOfStep || (exports.StatusOfStep = StatusOfStep = {}));
|
|
12
13
|
exports.default = StatusOfStep;
|
|
@@ -40,7 +40,8 @@ function onTestEnd(body, featureName, scenarioName, statusCode, screenshotBuffer
|
|
|
40
40
|
passedSteps: log_service_1.default.getStatusCount(status_of_step_1.StatusOfStep.PASSED),
|
|
41
41
|
skippedSteps: log_service_1.default.getStatusCount(status_of_step_1.StatusOfStep.SKIPPED),
|
|
42
42
|
suggestedSteps: log_service_1.default.getStatusCount(status_of_step_1.StatusOfStep.SUGGESTION),
|
|
43
|
-
performanceFailure: log_service_1.default.getStatusCount(status_of_step_1.StatusOfStep.PERFORMANCE_FAIL)
|
|
43
|
+
performanceFailure: log_service_1.default.getStatusCount(status_of_step_1.StatusOfStep.PERFORMANCE_FAIL),
|
|
44
|
+
log: log_service_1.default.getStatusCount(status_of_step_1.StatusOfStep.LOG)
|
|
44
45
|
};
|
|
45
46
|
isFinal = (!(body.nextSuites && body.nextSuites.length > 0));
|
|
46
47
|
yield (0, report_service_1.updateReport)(body.reportId, scenario, stepCounts, isFinal);
|
|
@@ -9,7 +9,8 @@ class LogSteps {
|
|
|
9
9
|
[status_of_step_1.StatusOfStep.FAILED]: 0,
|
|
10
10
|
[status_of_step_1.StatusOfStep.SKIPPED]: 0,
|
|
11
11
|
[status_of_step_1.StatusOfStep.SUGGESTION]: 0,
|
|
12
|
-
[status_of_step_1.StatusOfStep.PERFORMANCE_FAIL]: 0
|
|
12
|
+
[status_of_step_1.StatusOfStep.PERFORMANCE_FAIL]: 0,
|
|
13
|
+
[status_of_step_1.StatusOfStep.LOG]: 0
|
|
13
14
|
};
|
|
14
15
|
this.stepLog = [];
|
|
15
16
|
this.lastStepTime = new Date().getTime();
|
|
@@ -55,7 +56,8 @@ class LogSteps {
|
|
|
55
56
|
[status_of_step_1.StatusOfStep.FAILED]: 0,
|
|
56
57
|
[status_of_step_1.StatusOfStep.SKIPPED]: 0,
|
|
57
58
|
[status_of_step_1.StatusOfStep.SUGGESTION]: 0,
|
|
58
|
-
[status_of_step_1.StatusOfStep.PERFORMANCE_FAIL]: 0
|
|
59
|
+
[status_of_step_1.StatusOfStep.PERFORMANCE_FAIL]: 0,
|
|
60
|
+
[status_of_step_1.StatusOfStep.LOG]: 0
|
|
59
61
|
};
|
|
60
62
|
}
|
|
61
63
|
push(keyword, tag, name, status, screenshot = new ArrayBuffer(0), imageCompareKey = '') {
|
|
@@ -15,8 +15,10 @@ export interface Steps {
|
|
|
15
15
|
skippedSteps: number;
|
|
16
16
|
suggestedSteps: number;
|
|
17
17
|
performanceFailure: number;
|
|
18
|
+
log: number;
|
|
18
19
|
}
|
|
19
|
-
export declare function setTimeZone(): Promise<
|
|
20
|
+
export declare function setTimeZone(): Promise<any>;
|
|
21
|
+
export declare function setEmailProvider(): Promise<any>;
|
|
20
22
|
export declare function createEmptyReport(body: any): Promise<string>;
|
|
21
23
|
export declare function uploadStep(stepLog: Step[], scenarioName: string, screenshot?: Buffer, errMessage?: object): Promise<{
|
|
22
24
|
stepRef: any;
|
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.getVerifyReceivedEmail = exports.postNotificationsOnFail = exports.postNotifications = exports.compareScreenshots = exports.getLastDayResults = exports.getReport = exports.updateReport = exports.uploadScenario = exports.uploadStep = exports.createEmptyReport = exports.setTimeZone = void 0;
|
|
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
18
|
function headers(token) {
|
|
@@ -55,12 +55,23 @@ function auth() {
|
|
|
55
55
|
function setTimeZone() {
|
|
56
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57
57
|
const token = yield auth();
|
|
58
|
-
return (yield axios_1.default.post(config_1.config.auxtaURL + "set-timezone", {
|
|
59
|
-
organization: config_1.config.organization
|
|
58
|
+
return (yield axios_1.default.post(config_1.config.auxtaURL + "set-timezone-organization", {
|
|
59
|
+
organization: config_1.config.organization,
|
|
60
|
+
timezone: config_1.config.timezone
|
|
60
61
|
}, headers(token))).data;
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
64
|
exports.setTimeZone = setTimeZone;
|
|
65
|
+
function setEmailProvider() {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const token = yield auth();
|
|
68
|
+
return (yield axios_1.default.post(config_1.config.auxtaURL + "set-email-provider-organization", {
|
|
69
|
+
organization: config_1.config.organization,
|
|
70
|
+
emailProvider: config_1.config.emailProvider
|
|
71
|
+
}, headers(token))).data;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
exports.setEmailProvider = setEmailProvider;
|
|
64
75
|
function createEmptyReport(body) {
|
|
65
76
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
77
|
const token = yield auth();
|
|
@@ -70,6 +81,7 @@ function createEmptyReport(body) {
|
|
|
70
81
|
digitalProductToken: body.digitalProduct,
|
|
71
82
|
bucket: body.bucket,
|
|
72
83
|
start: moment().tz(config_1.config.timezone),
|
|
84
|
+
emailProvider: config_1.config.emailProvider,
|
|
73
85
|
url: body.baseUrl
|
|
74
86
|
}, headers(token))).data.reportId;
|
|
75
87
|
});
|
|
@@ -26,7 +26,9 @@ 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
|
-
log_service_1.default.tag
|
|
29
|
+
if (!log_service_1.default.tag || log_service_1.default.tag === 'default') {
|
|
30
|
+
log_service_1.default.tag = tag;
|
|
31
|
+
}
|
|
30
32
|
}
|
|
31
33
|
clearTag() {
|
|
32
34
|
log_service_1.default.tag = '';
|