@auxcode/auxta 1.3.25 → 1.3.26-beta.3
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/README.md +4 -0
- package/build/cjs/AuxTA.d.ts +62 -61
- package/build/cjs/AuxTA.d.ts.map +1 -0
- package/build/cjs/AuxTA.js +152 -152
- package/build/cjs/auxta/configs/config.d.ts +55 -54
- package/build/cjs/auxta/configs/config.d.ts.map +1 -0
- package/build/cjs/auxta/configs/config.js +65 -65
- package/build/cjs/auxta/enums/status-of.step.d.ts +8 -7
- package/build/cjs/auxta/enums/status-of.step.d.ts.map +1 -0
- package/build/cjs/auxta/enums/status-of.step.js +11 -11
- package/build/cjs/auxta/helpers/response.helper.d.ts +11 -10
- package/build/cjs/auxta/helpers/response.helper.d.ts.map +1 -0
- package/build/cjs/auxta/helpers/response.helper.js +15 -15
- package/build/cjs/auxta/helpers/start.helper.d.ts +2 -1
- package/build/cjs/auxta/helpers/start.helper.d.ts.map +1 -0
- package/build/cjs/auxta/helpers/start.helper.js +26 -26
- package/build/cjs/auxta/hooks/report.hook.d.ts +15 -14
- package/build/cjs/auxta/hooks/report.hook.d.ts.map +1 -0
- package/build/cjs/auxta/hooks/report.hook.js +66 -66
- package/build/cjs/auxta/models/upload.model.d.ts +33 -32
- package/build/cjs/auxta/models/upload.model.d.ts.map +1 -0
- package/build/cjs/auxta/models/upload.model.js +75 -75
- package/build/cjs/auxta/services/log.service.d.ts +27 -26
- package/build/cjs/auxta/services/log.service.d.ts.map +1 -0
- package/build/cjs/auxta/services/log.service.js +47 -47
- package/build/cjs/auxta/services/report.service.d.ts +37 -36
- package/build/cjs/auxta/services/report.service.d.ts.map +1 -0
- package/build/cjs/auxta/services/report.service.js +164 -164
- package/build/cjs/auxta/services/runtime.service.d.ts +17 -16
- package/build/cjs/auxta/services/runtime.service.d.ts.map +1 -0
- package/build/cjs/auxta/services/runtime.service.js +41 -41
- package/build/cjs/auxta/utilities/runtime.helper.d.ts +16 -15
- package/build/cjs/auxta/utilities/runtime.helper.d.ts.map +1 -0
- package/build/cjs/auxta/utilities/runtime.helper.js +19 -19
- package/build/cjs/auxta/utilities/screenshot.helper.d.ts +3 -2
- package/build/cjs/auxta/utilities/screenshot.helper.d.ts.map +1 -0
- package/build/cjs/auxta/utilities/screenshot.helper.js +36 -36
- package/build/cjs/auxta/utilities/start-suite.helper.d.ts +18 -17
- package/build/cjs/auxta/utilities/start-suite.helper.d.ts.map +1 -0
- package/build/cjs/auxta/utilities/start-suite.helper.js +31 -31
- package/build/cjs/macros/helpers/Aux2faAuth.d.ts +8 -7
- package/build/cjs/macros/helpers/Aux2faAuth.d.ts.map +1 -0
- package/build/cjs/macros/helpers/Aux2faAuth.js +29 -29
- package/build/cjs/macros/helpers/AuxGoogleAuth.d.ts +18 -17
- package/build/cjs/macros/helpers/AuxGoogleAuth.d.ts.map +1 -0
- package/build/cjs/macros/helpers/AuxGoogleAuth.js +104 -104
- package/build/cjs/macros/helpers/code.helper.d.ts +22 -21
- package/build/cjs/macros/helpers/code.helper.d.ts.map +1 -0
- package/build/cjs/macros/helpers/code.helper.js +201 -201
- package/build/cjs/macros/helpers/emailHelper.d.ts +20 -19
- package/build/cjs/macros/helpers/emailHelper.d.ts.map +1 -0
- package/build/cjs/macros/helpers/emailHelper.js +167 -167
- package/build/cjs/macros/helpers/extend-default-page.d.ts +7 -6
- package/build/cjs/macros/helpers/extend-default-page.d.ts.map +1 -0
- package/build/cjs/macros/helpers/extend-default-page.js +89 -89
- package/build/cjs/puppeteer/puppeteer.d.ts +26 -25
- package/build/cjs/puppeteer/puppeteer.d.ts.map +1 -0
- package/build/cjs/puppeteer/puppeteer.js +203 -196
- package/build/esm/AuxTA.d.ts +62 -61
- package/build/esm/AuxTA.d.ts.map +1 -0
- package/build/esm/AuxTA.js +123 -123
- package/build/esm/auxta/configs/config.d.ts +55 -54
- package/build/esm/auxta/configs/config.d.ts.map +1 -0
- package/build/esm/auxta/configs/config.js +60 -60
- package/build/esm/auxta/enums/status-of.step.d.ts +8 -7
- package/build/esm/auxta/enums/status-of.step.d.ts.map +1 -0
- package/build/esm/auxta/enums/status-of.step.js +8 -8
- package/build/esm/auxta/helpers/response.helper.d.ts +11 -10
- package/build/esm/auxta/helpers/response.helper.d.ts.map +1 -0
- package/build/esm/auxta/helpers/response.helper.js +11 -11
- package/build/esm/auxta/helpers/start.helper.d.ts +2 -1
- package/build/esm/auxta/helpers/start.helper.d.ts.map +1 -0
- package/build/esm/auxta/helpers/start.helper.js +24 -24
- package/build/esm/auxta/hooks/report.hook.d.ts +15 -14
- package/build/esm/auxta/hooks/report.hook.d.ts.map +1 -0
- package/build/esm/auxta/hooks/report.hook.js +58 -58
- package/build/esm/auxta/models/upload.model.d.ts +33 -32
- package/build/esm/auxta/models/upload.model.d.ts.map +1 -0
- package/build/esm/auxta/models/upload.model.js +71 -71
- package/build/esm/auxta/services/log.service.d.ts +27 -26
- package/build/esm/auxta/services/log.service.d.ts.map +1 -0
- package/build/esm/auxta/services/log.service.js +43 -43
- package/build/esm/auxta/services/report.service.d.ts +37 -36
- package/build/esm/auxta/services/report.service.d.ts.map +1 -0
- package/build/esm/auxta/services/report.service.js +150 -150
- package/build/esm/auxta/services/runtime.service.d.ts +17 -16
- package/build/esm/auxta/services/runtime.service.d.ts.map +1 -0
- package/build/esm/auxta/services/runtime.service.js +37 -37
- package/build/esm/auxta/utilities/runtime.helper.d.ts +16 -15
- package/build/esm/auxta/utilities/runtime.helper.d.ts.map +1 -0
- package/build/esm/auxta/utilities/runtime.helper.js +15 -15
- package/build/esm/auxta/utilities/screenshot.helper.d.ts +3 -2
- package/build/esm/auxta/utilities/screenshot.helper.d.ts.map +1 -0
- package/build/esm/auxta/utilities/screenshot.helper.js +29 -29
- package/build/esm/auxta/utilities/start-suite.helper.d.ts +18 -17
- package/build/esm/auxta/utilities/start-suite.helper.d.ts.map +1 -0
- package/build/esm/auxta/utilities/start-suite.helper.js +26 -26
- package/build/esm/macros/helpers/Aux2faAuth.d.ts +8 -7
- package/build/esm/macros/helpers/Aux2faAuth.d.ts.map +1 -0
- package/build/esm/macros/helpers/Aux2faAuth.js +25 -25
- package/build/esm/macros/helpers/AuxGoogleAuth.d.ts +18 -17
- package/build/esm/macros/helpers/AuxGoogleAuth.d.ts.map +1 -0
- package/build/esm/macros/helpers/AuxGoogleAuth.js +100 -100
- package/build/esm/macros/helpers/code.helper.d.ts +22 -21
- package/build/esm/macros/helpers/code.helper.d.ts.map +1 -0
- package/build/esm/macros/helpers/code.helper.js +194 -194
- package/build/esm/macros/helpers/emailHelper.d.ts +20 -19
- package/build/esm/macros/helpers/emailHelper.d.ts.map +1 -0
- package/build/esm/macros/helpers/emailHelper.js +160 -160
- package/build/esm/macros/helpers/extend-default-page.d.ts +7 -6
- package/build/esm/macros/helpers/extend-default-page.d.ts.map +1 -0
- package/build/esm/macros/helpers/extend-default-page.js +82 -82
- package/build/esm/puppeteer/puppeteer.d.ts +26 -25
- package/build/esm/puppeteer/puppeteer.d.ts.map +1 -0
- package/build/esm/puppeteer/puppeteer.js +195 -188
- package/build/tsconfig-cjs.tsbuildinfo +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/build/esm/AuxTA.js
CHANGED
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import puppeteer from "./puppeteer/puppeteer";
|
|
11
|
-
import { FunctionHelper } from "./macros/helpers/code.helper";
|
|
12
|
-
import path from "path";
|
|
13
|
-
import fs from "fs";
|
|
14
|
-
import StatusOfStep from "./auxta/enums/status-of.step";
|
|
15
|
-
import { UploadModel } from "./auxta/models/upload.model";
|
|
16
|
-
import * as dotenv from "dotenv";
|
|
17
|
-
import { setupConfig, config as c, setupOverrideConfig } from "./auxta/configs/config";
|
|
18
|
-
import { startSuite } from "./auxta/utilities/start-suite.helper";
|
|
19
|
-
import { createEmptyReport } from "./auxta/services/report.service";
|
|
20
|
-
import Aux2faAuth from "./macros/helpers/Aux2faAuth";
|
|
21
|
-
import { AuxGoogleAuth } from "./macros/helpers/AuxGoogleAuth";
|
|
22
|
-
import emailHelper from "./macros/helpers/emailHelper";
|
|
23
|
-
dotenv.config();
|
|
24
|
-
class AuxTA extends FunctionHelper {
|
|
25
|
-
constructor() {
|
|
26
|
-
super();
|
|
27
|
-
this.puppeteer = puppeteer;
|
|
28
|
-
this.aux2fa = Aux2faAuth;
|
|
29
|
-
this.google = AuxGoogleAuth;
|
|
30
|
-
this.config = c;
|
|
31
|
-
this.email = emailHelper;
|
|
32
|
-
let file;
|
|
33
|
-
if (!process.env.RPA) {
|
|
34
|
-
try {
|
|
35
|
-
let currentDir = "";
|
|
36
|
-
while (true) {
|
|
37
|
-
file = path.join(__dirname, currentDir, "auxta.json");
|
|
38
|
-
if (!fs.existsSync(file)) {
|
|
39
|
-
currentDir += "../";
|
|
40
|
-
if (currentDir.length >= 30) {
|
|
41
|
-
console.log("auxta.json file not found!");
|
|
42
|
-
process.exit(1);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
const jsonConfig = JSON.parse(fs.readFileSync(file).toString());
|
|
50
|
-
try {
|
|
51
|
-
this.config = setupConfig(jsonConfig);
|
|
52
|
-
}
|
|
53
|
-
catch (e) {
|
|
54
|
-
console.log("Missing field in auxta.json:", e);
|
|
55
|
-
}
|
|
56
|
-
this.uploadModel = new UploadModel(jsonConfig.organization, jsonConfig.baseURL, jsonConfig.digitalProduct, jsonConfig.environment);
|
|
57
|
-
}
|
|
58
|
-
catch (e) {
|
|
59
|
-
console.log("Missing or corrupted config: auxta.json. Searching in location:", file);
|
|
60
|
-
console.log(e);
|
|
61
|
-
process.exit(1);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
this.uploadModel = new UploadModel('', '', '', '');
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
run(event, overrideConfig) {
|
|
69
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
this.changeModelData(overrideConfig);
|
|
71
|
-
let reportId;
|
|
72
|
-
try {
|
|
73
|
-
if (event.reportId) {
|
|
74
|
-
reportId = event.reportId;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
catch (e) {
|
|
78
|
-
reportId = undefined;
|
|
79
|
-
}
|
|
80
|
-
const suites = this.config.suitesList.slice(0);
|
|
81
|
-
return startSuite(suites, reportId || (yield createEmptyReport(this.uploadModel)));
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
changeModelData(overrideConfig) {
|
|
85
|
-
if (overrideConfig) {
|
|
86
|
-
if (overrideConfig.digitalProduct)
|
|
87
|
-
this.uploadModel.digitalProduct = overrideConfig.digitalProduct;
|
|
88
|
-
if (overrideConfig.environment)
|
|
89
|
-
this.uploadModel.environment = overrideConfig.environment;
|
|
90
|
-
if (overrideConfig.baseURL)
|
|
91
|
-
this.uploadModel.baseUrl = overrideConfig.baseURL;
|
|
92
|
-
this.config = setupOverrideConfig(overrideConfig);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
startBrowser(event, callback, feature, scenario, overrideConfig, singleFeature = false, fileName = '') {
|
|
96
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
-
this.changeModelData(overrideConfig);
|
|
98
|
-
if (singleFeature && process.env.ENVIRONMENT !== 'LOCAL') {
|
|
99
|
-
this.uploadModel.reportId = yield createEmptyReport(this.uploadModel);
|
|
100
|
-
this.uploadModel.currentSuite = fileName;
|
|
101
|
-
this.uploadModel.nextSuites = [];
|
|
102
|
-
}
|
|
103
|
-
return this.puppeteer.run(event, callback, feature, scenario);
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
startBrowserRPA(event, callback, baseURL, fileName = '') {
|
|
107
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
-
this.changeModelData({
|
|
109
|
-
baseURL: baseURL,
|
|
110
|
-
environment: '',
|
|
111
|
-
digitalProduct: ''
|
|
112
|
-
});
|
|
113
|
-
this.uploadModel.currentSuite = fileName;
|
|
114
|
-
return this.puppeteer.runRPA(event, callback);
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
getUploadModel() {
|
|
118
|
-
return this.uploadModel;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
export const StepStatus = StatusOfStep;
|
|
122
|
-
const auxta = new AuxTA();
|
|
123
|
-
export default auxta;
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import puppeteer from "./puppeteer/puppeteer";
|
|
11
|
+
import { FunctionHelper } from "./macros/helpers/code.helper";
|
|
12
|
+
import path from "path";
|
|
13
|
+
import fs from "fs";
|
|
14
|
+
import StatusOfStep from "./auxta/enums/status-of.step";
|
|
15
|
+
import { UploadModel } from "./auxta/models/upload.model";
|
|
16
|
+
import * as dotenv from "dotenv";
|
|
17
|
+
import { setupConfig, config as c, setupOverrideConfig } from "./auxta/configs/config";
|
|
18
|
+
import { startSuite } from "./auxta/utilities/start-suite.helper";
|
|
19
|
+
import { createEmptyReport } from "./auxta/services/report.service";
|
|
20
|
+
import Aux2faAuth from "./macros/helpers/Aux2faAuth";
|
|
21
|
+
import { AuxGoogleAuth } from "./macros/helpers/AuxGoogleAuth";
|
|
22
|
+
import emailHelper from "./macros/helpers/emailHelper";
|
|
23
|
+
dotenv.config();
|
|
24
|
+
class AuxTA extends FunctionHelper {
|
|
25
|
+
constructor() {
|
|
26
|
+
super();
|
|
27
|
+
this.puppeteer = puppeteer;
|
|
28
|
+
this.aux2fa = Aux2faAuth;
|
|
29
|
+
this.google = AuxGoogleAuth;
|
|
30
|
+
this.config = c;
|
|
31
|
+
this.email = emailHelper;
|
|
32
|
+
let file;
|
|
33
|
+
if (!process.env.RPA) {
|
|
34
|
+
try {
|
|
35
|
+
let currentDir = "";
|
|
36
|
+
while (true) {
|
|
37
|
+
file = path.join(__dirname, currentDir, "auxta.json");
|
|
38
|
+
if (!fs.existsSync(file)) {
|
|
39
|
+
currentDir += "../";
|
|
40
|
+
if (currentDir.length >= 30) {
|
|
41
|
+
console.log("auxta.json file not found!");
|
|
42
|
+
process.exit(1);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
const jsonConfig = JSON.parse(fs.readFileSync(file).toString());
|
|
50
|
+
try {
|
|
51
|
+
this.config = setupConfig(jsonConfig);
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
console.log("Missing field in auxta.json:", e);
|
|
55
|
+
}
|
|
56
|
+
this.uploadModel = new UploadModel(jsonConfig.organization, jsonConfig.baseURL, jsonConfig.digitalProduct, jsonConfig.environment);
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
console.log("Missing or corrupted config: auxta.json. Searching in location:", file);
|
|
60
|
+
console.log(e);
|
|
61
|
+
process.exit(1);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
this.uploadModel = new UploadModel('', '', '', '');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
run(event, overrideConfig) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
this.changeModelData(overrideConfig);
|
|
71
|
+
let reportId;
|
|
72
|
+
try {
|
|
73
|
+
if (event.reportId) {
|
|
74
|
+
reportId = event.reportId;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch (e) {
|
|
78
|
+
reportId = undefined;
|
|
79
|
+
}
|
|
80
|
+
const suites = this.config.suitesList.slice(0);
|
|
81
|
+
return startSuite(suites, reportId || (yield createEmptyReport(this.uploadModel)));
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
changeModelData(overrideConfig) {
|
|
85
|
+
if (overrideConfig) {
|
|
86
|
+
if (overrideConfig.digitalProduct)
|
|
87
|
+
this.uploadModel.digitalProduct = overrideConfig.digitalProduct;
|
|
88
|
+
if (overrideConfig.environment)
|
|
89
|
+
this.uploadModel.environment = overrideConfig.environment;
|
|
90
|
+
if (overrideConfig.baseURL)
|
|
91
|
+
this.uploadModel.baseUrl = overrideConfig.baseURL;
|
|
92
|
+
this.config = setupOverrideConfig(overrideConfig);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
startBrowser(event, callback, feature, scenario, overrideConfig, singleFeature = false, fileName = '') {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
this.changeModelData(overrideConfig);
|
|
98
|
+
if (singleFeature && process.env.ENVIRONMENT !== 'LOCAL') {
|
|
99
|
+
this.uploadModel.reportId = yield createEmptyReport(this.uploadModel);
|
|
100
|
+
this.uploadModel.currentSuite = fileName;
|
|
101
|
+
this.uploadModel.nextSuites = [];
|
|
102
|
+
}
|
|
103
|
+
return this.puppeteer.run(event, callback, feature, scenario);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
startBrowserRPA(event, callback, baseURL, fileName = '') {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
this.changeModelData({
|
|
109
|
+
baseURL: baseURL,
|
|
110
|
+
environment: '',
|
|
111
|
+
digitalProduct: ''
|
|
112
|
+
});
|
|
113
|
+
this.uploadModel.currentSuite = fileName;
|
|
114
|
+
return this.puppeteer.runRPA(event, callback);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
getUploadModel() {
|
|
118
|
+
return this.uploadModel;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
export const StepStatus = StatusOfStep;
|
|
122
|
+
const auxta = new AuxTA();
|
|
123
|
+
export default auxta;
|
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
export declare function setupConfig(jsonConfig: any): {
|
|
2
|
-
auxtaURL: string;
|
|
3
|
-
baseURL: string;
|
|
4
|
-
siteURL: string;
|
|
5
|
-
organization: string;
|
|
6
|
-
netlifyPath: string;
|
|
7
|
-
digitalProduct: string;
|
|
8
|
-
token: string;
|
|
9
|
-
screenWidth: number;
|
|
10
|
-
screenHeight: number;
|
|
11
|
-
timeout: number;
|
|
12
|
-
suitesList: never[];
|
|
13
|
-
googleEmail: string;
|
|
14
|
-
auxtaCredentials: {
|
|
15
|
-
email: string;
|
|
16
|
-
password: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export declare function setupOverrideConfig(overrideConfig: any): {
|
|
20
|
-
auxtaURL: string;
|
|
21
|
-
baseURL: string;
|
|
22
|
-
siteURL: string;
|
|
23
|
-
organization: string;
|
|
24
|
-
netlifyPath: string;
|
|
25
|
-
digitalProduct: string;
|
|
26
|
-
token: string;
|
|
27
|
-
screenWidth: number;
|
|
28
|
-
screenHeight: number;
|
|
29
|
-
timeout: number;
|
|
30
|
-
suitesList: never[];
|
|
31
|
-
googleEmail: string;
|
|
32
|
-
auxtaCredentials: {
|
|
33
|
-
email: string;
|
|
34
|
-
password: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
export declare let config: {
|
|
38
|
-
auxtaURL: string;
|
|
39
|
-
baseURL: string;
|
|
40
|
-
siteURL: string;
|
|
41
|
-
organization: string;
|
|
42
|
-
netlifyPath: string;
|
|
43
|
-
digitalProduct: string;
|
|
44
|
-
token: string;
|
|
45
|
-
screenWidth: number;
|
|
46
|
-
screenHeight: number;
|
|
47
|
-
timeout: number;
|
|
48
|
-
suitesList: never[];
|
|
49
|
-
googleEmail: string;
|
|
50
|
-
auxtaCredentials: {
|
|
51
|
-
email: string;
|
|
52
|
-
password: string;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
1
|
+
export declare function setupConfig(jsonConfig: any): {
|
|
2
|
+
auxtaURL: string;
|
|
3
|
+
baseURL: string;
|
|
4
|
+
siteURL: string;
|
|
5
|
+
organization: string;
|
|
6
|
+
netlifyPath: string;
|
|
7
|
+
digitalProduct: string;
|
|
8
|
+
token: string;
|
|
9
|
+
screenWidth: number;
|
|
10
|
+
screenHeight: number;
|
|
11
|
+
timeout: number;
|
|
12
|
+
suitesList: never[];
|
|
13
|
+
googleEmail: string;
|
|
14
|
+
auxtaCredentials: {
|
|
15
|
+
email: string;
|
|
16
|
+
password: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare function setupOverrideConfig(overrideConfig: any): {
|
|
20
|
+
auxtaURL: string;
|
|
21
|
+
baseURL: string;
|
|
22
|
+
siteURL: string;
|
|
23
|
+
organization: string;
|
|
24
|
+
netlifyPath: string;
|
|
25
|
+
digitalProduct: string;
|
|
26
|
+
token: string;
|
|
27
|
+
screenWidth: number;
|
|
28
|
+
screenHeight: number;
|
|
29
|
+
timeout: number;
|
|
30
|
+
suitesList: never[];
|
|
31
|
+
googleEmail: string;
|
|
32
|
+
auxtaCredentials: {
|
|
33
|
+
email: string;
|
|
34
|
+
password: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare let config: {
|
|
38
|
+
auxtaURL: string;
|
|
39
|
+
baseURL: string;
|
|
40
|
+
siteURL: string;
|
|
41
|
+
organization: string;
|
|
42
|
+
netlifyPath: string;
|
|
43
|
+
digitalProduct: string;
|
|
44
|
+
token: string;
|
|
45
|
+
screenWidth: number;
|
|
46
|
+
screenHeight: number;
|
|
47
|
+
timeout: number;
|
|
48
|
+
suitesList: never[];
|
|
49
|
+
googleEmail: string;
|
|
50
|
+
auxtaCredentials: {
|
|
51
|
+
email: string;
|
|
52
|
+
password: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/auxta/configs/config.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,UAAU,EAAE,GAAG;;;;;;;;;;;;;;;;;EAoB1C;AAED,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,GAAG;;;;;;;;;;;;;;;;;EAMtD;AAED,eAAO,IAAI,MAAM;;;;;;;;;;;;;;;;;CAiBhB,CAAA"}
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
export function setupConfig(jsonConfig) {
|
|
2
|
-
if (!jsonConfig.baseURL)
|
|
3
|
-
throw new Error("baseURL");
|
|
4
|
-
config.baseURL = jsonConfig.baseURL;
|
|
5
|
-
if (!jsonConfig.digitalProduct)
|
|
6
|
-
throw new Error("digitalProduct");
|
|
7
|
-
config.digitalProduct = jsonConfig.digitalProduct;
|
|
8
|
-
if (!jsonConfig.testsURL)
|
|
9
|
-
throw new Error("testsURL");
|
|
10
|
-
config.netlifyPath = (process.env.ENVIRONMENT == 'LOCAL') ? 'http://localhost:9999/' : jsonConfig.testsURL;
|
|
11
|
-
if (!jsonConfig.organization)
|
|
12
|
-
throw new Error("organization");
|
|
13
|
-
config.organization = jsonConfig.organization;
|
|
14
|
-
if (!jsonConfig.email)
|
|
15
|
-
throw new Error("email");
|
|
16
|
-
config.auxtaCredentials.email = jsonConfig.email;
|
|
17
|
-
if (!process.env.auxta_password)
|
|
18
|
-
throw new Error("password");
|
|
19
|
-
config.auxtaCredentials.password = process.env.auxta_password;
|
|
20
|
-
if (!jsonConfig.suitesList)
|
|
21
|
-
throw new Error("suitesList");
|
|
22
|
-
config.suitesList = jsonConfig.suitesList;
|
|
23
|
-
config.googleEmail = jsonConfig.googleEmail;
|
|
24
|
-
if (jsonConfig.timeout)
|
|
25
|
-
config.timeout = jsonConfig.timeout;
|
|
26
|
-
if (jsonConfig.screenWidth)
|
|
27
|
-
config.screenWidth = jsonConfig.screenWidth;
|
|
28
|
-
if (jsonConfig.screenHeight)
|
|
29
|
-
config.screenHeight = jsonConfig.screenHeight;
|
|
30
|
-
return config;
|
|
31
|
-
}
|
|
32
|
-
export function setupOverrideConfig(overrideConfig) {
|
|
33
|
-
if (overrideConfig.baseURL)
|
|
34
|
-
config.baseURL = overrideConfig.baseURL;
|
|
35
|
-
if (overrideConfig.digitalProduct)
|
|
36
|
-
config.digitalProduct = overrideConfig.digitalProduct;
|
|
37
|
-
if (overrideConfig.screenWidth)
|
|
38
|
-
config.screenWidth = overrideConfig.screenWidth;
|
|
39
|
-
if (overrideConfig.screenHeight)
|
|
40
|
-
config.screenHeight = overrideConfig.screenHeight;
|
|
41
|
-
return config;
|
|
42
|
-
}
|
|
43
|
-
export let config = {
|
|
44
|
-
auxtaURL: "https://auxta.live/.netlify/functions/",
|
|
45
|
-
baseURL: "",
|
|
46
|
-
siteURL: "",
|
|
47
|
-
organization: "",
|
|
48
|
-
netlifyPath: "",
|
|
49
|
-
digitalProduct: "",
|
|
50
|
-
token: "",
|
|
51
|
-
screenWidth: 1920,
|
|
52
|
-
screenHeight: 1080,
|
|
53
|
-
timeout: 60000,
|
|
54
|
-
suitesList: [],
|
|
55
|
-
googleEmail: "",
|
|
56
|
-
auxtaCredentials: {
|
|
57
|
-
email: "",
|
|
58
|
-
password: "",
|
|
59
|
-
},
|
|
60
|
-
};
|
|
1
|
+
export function setupConfig(jsonConfig) {
|
|
2
|
+
if (!jsonConfig.baseURL)
|
|
3
|
+
throw new Error("baseURL");
|
|
4
|
+
config.baseURL = jsonConfig.baseURL;
|
|
5
|
+
if (!jsonConfig.digitalProduct)
|
|
6
|
+
throw new Error("digitalProduct");
|
|
7
|
+
config.digitalProduct = jsonConfig.digitalProduct;
|
|
8
|
+
if (!jsonConfig.testsURL)
|
|
9
|
+
throw new Error("testsURL");
|
|
10
|
+
config.netlifyPath = (process.env.ENVIRONMENT == 'LOCAL') ? 'http://localhost:9999/' : jsonConfig.testsURL;
|
|
11
|
+
if (!jsonConfig.organization)
|
|
12
|
+
throw new Error("organization");
|
|
13
|
+
config.organization = jsonConfig.organization;
|
|
14
|
+
if (!jsonConfig.email)
|
|
15
|
+
throw new Error("email");
|
|
16
|
+
config.auxtaCredentials.email = jsonConfig.email;
|
|
17
|
+
if (!process.env.auxta_password)
|
|
18
|
+
throw new Error("password");
|
|
19
|
+
config.auxtaCredentials.password = process.env.auxta_password;
|
|
20
|
+
if (!jsonConfig.suitesList)
|
|
21
|
+
throw new Error("suitesList");
|
|
22
|
+
config.suitesList = jsonConfig.suitesList;
|
|
23
|
+
config.googleEmail = jsonConfig.googleEmail;
|
|
24
|
+
if (jsonConfig.timeout)
|
|
25
|
+
config.timeout = jsonConfig.timeout;
|
|
26
|
+
if (jsonConfig.screenWidth)
|
|
27
|
+
config.screenWidth = jsonConfig.screenWidth;
|
|
28
|
+
if (jsonConfig.screenHeight)
|
|
29
|
+
config.screenHeight = jsonConfig.screenHeight;
|
|
30
|
+
return config;
|
|
31
|
+
}
|
|
32
|
+
export function setupOverrideConfig(overrideConfig) {
|
|
33
|
+
if (overrideConfig.baseURL)
|
|
34
|
+
config.baseURL = overrideConfig.baseURL;
|
|
35
|
+
if (overrideConfig.digitalProduct)
|
|
36
|
+
config.digitalProduct = overrideConfig.digitalProduct;
|
|
37
|
+
if (overrideConfig.screenWidth)
|
|
38
|
+
config.screenWidth = overrideConfig.screenWidth;
|
|
39
|
+
if (overrideConfig.screenHeight)
|
|
40
|
+
config.screenHeight = overrideConfig.screenHeight;
|
|
41
|
+
return config;
|
|
42
|
+
}
|
|
43
|
+
export let config = {
|
|
44
|
+
auxtaURL: "https://auxta.live/.netlify/functions/",
|
|
45
|
+
baseURL: "",
|
|
46
|
+
siteURL: "",
|
|
47
|
+
organization: "",
|
|
48
|
+
netlifyPath: "",
|
|
49
|
+
digitalProduct: "",
|
|
50
|
+
token: "",
|
|
51
|
+
screenWidth: 1920,
|
|
52
|
+
screenHeight: 1080,
|
|
53
|
+
timeout: 60000,
|
|
54
|
+
suitesList: [],
|
|
55
|
+
googleEmail: "",
|
|
56
|
+
auxtaCredentials: {
|
|
57
|
+
email: "",
|
|
58
|
+
password: "",
|
|
59
|
+
},
|
|
60
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export declare enum StatusOfStep {
|
|
2
|
-
PASSED = "passed",
|
|
3
|
-
FAILED = "failed",
|
|
4
|
-
SKIPPED = "skipped",
|
|
5
|
-
SUGGESTION = "suggestion"
|
|
6
|
-
}
|
|
7
|
-
export default StatusOfStep;
|
|
1
|
+
export declare enum StatusOfStep {
|
|
2
|
+
PASSED = "passed",
|
|
3
|
+
FAILED = "failed",
|
|
4
|
+
SKIPPED = "skipped",
|
|
5
|
+
SUGGESTION = "suggestion"
|
|
6
|
+
}
|
|
7
|
+
export default StatusOfStep;
|
|
8
|
+
//# sourceMappingURL=status-of.step.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-of.step.d.ts","sourceRoot":"","sources":["../../../../src/auxta/enums/status-of.step.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACpB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,UAAU,eAAe;CAC5B;AACD,eAAe,YAAY,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export var StatusOfStep;
|
|
2
|
-
(function (StatusOfStep) {
|
|
3
|
-
StatusOfStep["PASSED"] = "passed";
|
|
4
|
-
StatusOfStep["FAILED"] = "failed";
|
|
5
|
-
StatusOfStep["SKIPPED"] = "skipped";
|
|
6
|
-
StatusOfStep["SUGGESTION"] = "suggestion";
|
|
7
|
-
})(StatusOfStep || (StatusOfStep = {}));
|
|
8
|
-
export default StatusOfStep;
|
|
1
|
+
export var StatusOfStep;
|
|
2
|
+
(function (StatusOfStep) {
|
|
3
|
+
StatusOfStep["PASSED"] = "passed";
|
|
4
|
+
StatusOfStep["FAILED"] = "failed";
|
|
5
|
+
StatusOfStep["SKIPPED"] = "skipped";
|
|
6
|
+
StatusOfStep["SUGGESTION"] = "suggestion";
|
|
7
|
+
})(StatusOfStep || (StatusOfStep = {}));
|
|
8
|
+
export default StatusOfStep;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
export declare function returnImage(code: number, screenshot: Buffer): {
|
|
3
|
-
isBase64Encoded: boolean;
|
|
4
|
-
statusCode: number;
|
|
5
|
-
headers: {
|
|
6
|
-
"Content-Type": string;
|
|
7
|
-
"Content-Length": string;
|
|
8
|
-
};
|
|
9
|
-
body: string;
|
|
10
|
-
};
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export declare function returnImage(code: number, screenshot: Buffer): {
|
|
3
|
+
isBase64Encoded: boolean;
|
|
4
|
+
statusCode: number;
|
|
5
|
+
headers: {
|
|
6
|
+
"Content-Type": string;
|
|
7
|
+
"Content-Length": string;
|
|
8
|
+
};
|
|
9
|
+
body: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=response.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.helper.d.ts","sourceRoot":"","sources":["../../../../src/auxta/helpers/response.helper.ts"],"names":[],"mappings":";AAAA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;;;;;;;;EAU3D"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export function returnImage(code, screenshot) {
|
|
2
|
-
return {
|
|
3
|
-
isBase64Encoded: true,
|
|
4
|
-
statusCode: code,
|
|
5
|
-
headers: {
|
|
6
|
-
"Content-Type": "image/png",
|
|
7
|
-
"Content-Length": screenshot.length.toString()
|
|
8
|
-
},
|
|
9
|
-
body: screenshot.toString("base64")
|
|
10
|
-
};
|
|
11
|
-
}
|
|
1
|
+
export function returnImage(code, screenshot) {
|
|
2
|
+
return {
|
|
3
|
+
isBase64Encoded: true,
|
|
4
|
+
statusCode: code,
|
|
5
|
+
headers: {
|
|
6
|
+
"Content-Type": "image/png",
|
|
7
|
+
"Content-Length": screenshot.length.toString()
|
|
8
|
+
},
|
|
9
|
+
body: screenshot.toString("base64")
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=start.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start.helper.d.ts","sourceRoot":"","sources":["../../../../src/auxta/helpers/start.helper.ts"],"names":[],"mappings":""}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { join } from 'path';
|
|
11
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
12
|
-
const r = /^--params\.suite=(.*)$/g;
|
|
13
|
-
let suite = process.argv.find(el => !!el.match(r));
|
|
14
|
-
if (!suite)
|
|
15
|
-
throw `Locale is undefined`;
|
|
16
|
-
let suites = suite.replace('--params.suite=', '');
|
|
17
|
-
let suitesArr = suites.split(',');
|
|
18
|
-
if (!suitesArr)
|
|
19
|
-
suitesArr = [suites];
|
|
20
|
-
for (const suite of suitesArr) {
|
|
21
|
-
let f = require(join(process.cwd(), 'build', 'functions', 'controllers', suite));
|
|
22
|
-
yield f.handler();
|
|
23
|
-
}
|
|
24
|
-
}))();
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { join } from 'path';
|
|
11
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
12
|
+
const r = /^--params\.suite=(.*)$/g;
|
|
13
|
+
let suite = process.argv.find(el => !!el.match(r));
|
|
14
|
+
if (!suite)
|
|
15
|
+
throw `Locale is undefined`;
|
|
16
|
+
let suites = suite.replace('--params.suite=', '');
|
|
17
|
+
let suitesArr = suites.split(',');
|
|
18
|
+
if (!suitesArr)
|
|
19
|
+
suitesArr = [suites];
|
|
20
|
+
for (const suite of suitesArr) {
|
|
21
|
+
let f = require(join(process.cwd(), 'build', 'functions', 'controllers', suite));
|
|
22
|
+
yield f.handler();
|
|
23
|
+
}
|
|
24
|
+
}))();
|