sefiutils 1.0.30 → 1.0.32
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/lib/globalSetup.d.ts.map +1 -1
- package/lib/globalSetup.js +11 -5
- package/lib/globalSetup.js.map +1 -1
- package/package.json +1 -1
package/lib/globalSetup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalSetup.d.ts","sourceRoot":"","sources":["../src/globalSetup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"globalSetup.d.ts","sourceRoot":"","sources":["../src/globalSetup.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,CAAC;IACX,IAAI,MAAM,EAAE,GAAG,CAAC;CAEnB;AACD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAA8B,gBAAgB,kBAc7C"}
|
package/lib/globalSetup.js
CHANGED
|
@@ -32,6 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
const log_1 = require("./log");
|
|
35
36
|
/**
|
|
36
37
|
* This function is called by Jest once before all tests are executed.
|
|
37
38
|
* In order to get called, it must be referenced in the jest configuration file:
|
|
@@ -52,7 +53,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
52
53
|
function setGlobalObjects() {
|
|
53
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
55
|
const browser = process.env.BROWSER || "remote";
|
|
55
|
-
|
|
56
|
+
(0, log_1.verbose)(`Global Setup: Use browser: ${browser}`);
|
|
56
57
|
try {
|
|
57
58
|
if (browser === "remote") {
|
|
58
59
|
yield setUpSeleniumServer();
|
|
@@ -69,23 +70,28 @@ function setGlobalObjects() {
|
|
|
69
70
|
}
|
|
70
71
|
exports.default = setGlobalObjects;
|
|
71
72
|
function setUpSeleniumServer() {
|
|
73
|
+
var _a;
|
|
72
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
(0, log_1.debug)("Dynamic import of selenium-webdriver/remote and selenium-server-standalone-jar");
|
|
73
76
|
const remote = yield Promise.resolve().then(() => __importStar(require("selenium-webdriver/remote")));
|
|
74
77
|
//@ts-ignore
|
|
75
78
|
const jar = yield Promise.resolve().then(() => __importStar(require('selenium-server-standalone-jar')));
|
|
79
|
+
(0, log_1.debug)(() => `Loaded selenium server from ${jar.path}`);
|
|
76
80
|
if (globalThis.server) {
|
|
77
81
|
yield globalThis.server.kill();
|
|
78
|
-
|
|
82
|
+
(0, log_1.verbose)("`Server killed before starting again");
|
|
79
83
|
}
|
|
80
|
-
|
|
84
|
+
const startAddress = process.env.SELENIUM_REMOTE_URL || "http://localhost:4444/wd/hub";
|
|
85
|
+
const port = Number(((_a = startAddress.match(/:(\d+)\//)) === null || _a === void 0 ? void 0 : _a[1]) || 4444);
|
|
86
|
+
(0, log_1.debug)(() => `Start selenium server at port ${port} with SE_NODE_MAX_SESSIONS=4, SE_NODE_OVERRIDE_MAX_SESSIONS=true`);
|
|
81
87
|
const s = new remote.SeleniumServer(jar.path, {
|
|
82
|
-
port:
|
|
88
|
+
port: port,
|
|
83
89
|
env: Object.assign(Object.assign({}, process.env), { "SE_NODE_MAX_SESSIONS": "4", "SE_NODE_OVERRIDE_MAX_SESSIONS": "true" })
|
|
84
90
|
});
|
|
85
91
|
const address = yield s.start(3000);
|
|
86
92
|
globalThis.server = s;
|
|
87
93
|
// const address = await globalThis.server.address()
|
|
88
|
-
|
|
94
|
+
(0, log_1.debug)(() => `Selenium server started at: ${address}`);
|
|
89
95
|
});
|
|
90
96
|
}
|
|
91
97
|
//# sourceMappingURL=globalSetup.js.map
|
package/lib/globalSetup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalSetup.js","sourceRoot":"","sources":["../src/globalSetup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;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