@zohodesk/testinglibrary 0.3.4-experimental → 0.3.5-experimental
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.
|
@@ -106,13 +106,14 @@ function main() {
|
|
|
106
106
|
uatConfig.addAll(new _Configuration.default((0, _ConfigurationHelper.getApplicationConfig)()));
|
|
107
107
|
const {
|
|
108
108
|
isAuthMode,
|
|
109
|
-
mode,
|
|
110
109
|
editionOrder
|
|
111
110
|
} = uatConfig.getAll();
|
|
111
|
+
const userArgConfig = new _Configuration.default(_UserArgs.default.parseToObject(process.argv.slice(2)));
|
|
112
|
+
const mode = userArgConfig.get("mode");
|
|
112
113
|
(0, _envInitializer.initializeEnvConfig)(mode, isAuthMode);
|
|
113
114
|
|
|
114
115
|
// overriding the user config's from CLI
|
|
115
|
-
const userArgConfig = new
|
|
116
|
+
// const userArgConfig = new Configuration( UserArgs.parseToObject(process.argv.slice(2)) );
|
|
116
117
|
uatConfig.addAll(userArgConfig);
|
|
117
118
|
|
|
118
119
|
//This is only used for pass the user arguments to need places in legacy code. We need to rewamp that also.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// const UserArgs = require("../core/playwright/configuration/UserArgs");
|
|
4
|
+
// const Configuration = require("../core/playwright/configuration/Configuration");
|
|
5
|
+
|
|
6
|
+
// function main() {
|
|
7
|
+
// const config = new Configuration();
|
|
8
|
+
// config.set("reportPath", "home/reports");
|
|
9
|
+
|
|
10
|
+
// const fwConfig = new Configuration();
|
|
11
|
+
// fwConfig.set("browser", "chrome");
|
|
12
|
+
// fwConfig.set("trace", true);
|
|
13
|
+
// config.setFrameworkConfig(fwConfig);
|
|
14
|
+
|
|
15
|
+
// const appConfig = new Configuration();
|
|
16
|
+
// appConfig.set("environment", "CI");
|
|
17
|
+
// appConfig.set("edition", "test");
|
|
18
|
+
// config.setApplicationConfig(appConfig);
|
|
19
|
+
|
|
20
|
+
// const uaConfig = new Configuration();
|
|
21
|
+
// uaConfig.set("debug", true);
|
|
22
|
+
// uaConfig.set("headless", true);
|
|
23
|
+
// config.setUserArguments(uaConfig);
|
|
24
|
+
|
|
25
|
+
// console.log("default Config : ", config.get("reportPath"));
|
|
26
|
+
// console.log("framework Config : ", config.getFrameworkConfig()?.get("browser"));
|
|
27
|
+
// console.log("application Config : ", config.getApplicationConfig()?.get("environment"));
|
|
28
|
+
// console.log("User arguments : ", config.getUserArguments()?.get("debug"));
|
|
29
|
+
// }
|
|
30
|
+
|
|
31
|
+
// function test(){
|
|
32
|
+
// const prop = new Map();
|
|
33
|
+
// prop.set("browser","durai");
|
|
34
|
+
|
|
35
|
+
// const config = Configuration(prop);
|
|
36
|
+
// console.log("output :" +config.get("browser"));
|
|
37
|
+
// // console.log(prop);
|
|
38
|
+
|
|
39
|
+
// }
|
|
40
|
+
|
|
41
|
+
// function testParseToArgs(){
|
|
42
|
+
// const prop = new Map();
|
|
43
|
+
// prop.set("browser","durai");
|
|
44
|
+
// const userArgsObject = UserArgs.parseToArgs(prop);
|
|
45
|
+
// console.log(userArgsObject);
|
|
46
|
+
// }
|
|
47
|
+
|
|
48
|
+
function throwError() {
|
|
49
|
+
throw new Error("catch error");
|
|
50
|
+
}
|
|
51
|
+
function catchError() {
|
|
52
|
+
try {
|
|
53
|
+
throw new Error("catch error");
|
|
54
|
+
} catch (err) {
|
|
55
|
+
console.log(err.message);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// throwError();
|
|
60
|
+
catchError();
|
|
61
|
+
// testParseToArgs();
|
|
62
|
+
|
|
63
|
+
// main();
|
package/npm-shrinkwrap.json
CHANGED