@auxcode/auxta 1.3.103 → 1.3.105
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/hooks/report.hook.d.ts +2 -2
- package/build/auxta/hooks/report.hook.js +5 -11
- package/build/auxta/services/report.service.d.ts +2 -1
- package/build/auxta/services/report.service.js +15 -3
- package/build/puppeteer/puppeteer.js +1 -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
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { UploadModel } from "../models/upload.model";
|
|
3
|
-
export declare function onTestEnd(body: any, featureName: string, scenarioName: string, statusCode: number, screenshotBuffer?: Buffer, errMessage?: object
|
|
3
|
+
export declare function onTestEnd(body: any, featureName: string, scenarioName: string, statusCode: number, screenshotBuffer?: Buffer, errMessage?: object): Promise<{
|
|
4
4
|
nextSuites?: undefined;
|
|
5
5
|
reportId?: undefined;
|
|
6
6
|
currentSuite?: undefined;
|
|
@@ -11,4 +11,4 @@ export declare function onTestEnd(body: any, featureName: string, scenarioName:
|
|
|
11
11
|
currentSuite: string | undefined;
|
|
12
12
|
retries: string;
|
|
13
13
|
} | undefined>;
|
|
14
|
-
export declare function afterComplete(body: UploadModel
|
|
14
|
+
export declare function afterComplete(body: UploadModel): Promise<void>;
|
|
@@ -18,7 +18,7 @@ const log_service_1 = __importDefault(require("../services/log.service"));
|
|
|
18
18
|
const report_service_1 = require("../services/report.service");
|
|
19
19
|
const start_suite_helper_1 = require("../utilities/start-suite.helper");
|
|
20
20
|
const status_of_step_1 = require("../enums/status-of.step");
|
|
21
|
-
function onTestEnd(body, featureName, scenarioName, statusCode, screenshotBuffer, errMessage
|
|
21
|
+
function onTestEnd(body, featureName, scenarioName, statusCode, screenshotBuffer, errMessage) {
|
|
22
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
23
|
let isFinal = false;
|
|
24
24
|
if (process.env.ENVIRONMENT == "LIVE") {
|
|
@@ -52,23 +52,17 @@ function onTestEnd(body, featureName, scenarioName, statusCode, screenshotBuffer
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
if (isFinal)
|
|
55
|
-
yield afterComplete(body
|
|
55
|
+
yield afterComplete(body);
|
|
56
56
|
else if (body && body.nextSuites) {
|
|
57
57
|
return yield (0, start_suite_helper_1.startSuite)(body.nextSuites, body.reportId);
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
exports.onTestEnd = onTestEnd;
|
|
62
|
-
function afterComplete(body
|
|
62
|
+
function afterComplete(body) {
|
|
63
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
if (process.env.ENVIRONMENT == "LIVE")
|
|
65
|
-
|
|
66
|
-
yield (0, report_service_1.postNotifications)(body);
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
yield (0, report_service_1.postNotificationsOnFail)(body);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
64
|
+
if (process.env.ENVIRONMENT == "LIVE")
|
|
65
|
+
yield (0, report_service_1.postNotifications)(body);
|
|
72
66
|
});
|
|
73
67
|
}
|
|
74
68
|
exports.afterComplete = afterComplete;
|
|
@@ -16,7 +16,8 @@ export interface Steps {
|
|
|
16
16
|
suggestedSteps: number;
|
|
17
17
|
performanceFailure: number;
|
|
18
18
|
}
|
|
19
|
-
export declare function setTimeZone(): Promise<
|
|
19
|
+
export declare function setTimeZone(): Promise<any>;
|
|
20
|
+
export declare function setEmailProvider(): Promise<any>;
|
|
20
21
|
export declare function createEmptyReport(body: any): Promise<string>;
|
|
21
22
|
export declare function uploadStep(stepLog: Step[], scenarioName: string, screenshot?: Buffer, errMessage?: object): Promise<{
|
|
22
23
|
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
|
});
|