artes 1.1.26 → 1.1.28
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/package.json
CHANGED
|
@@ -7,15 +7,12 @@ const invokeBrowser = async () => {
|
|
|
7
7
|
let baseURL = "";
|
|
8
8
|
|
|
9
9
|
if (typeof cucumberConfig.baseURL === "object") {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
cucumberConfig.env
|
|
13
|
-
cucumberConfig.env != null
|
|
14
|
-
) {
|
|
15
|
-
baseURL = cucumberConfig.baseURL[cucumberConfig.env.trim()];
|
|
10
|
+
const env = (cucumberConfig.env || "").trim();
|
|
11
|
+
if (env && cucumberConfig.baseURL.hasOwnProperty(env)) {
|
|
12
|
+
baseURL = cucumberConfig.baseURL[env];
|
|
16
13
|
} else {
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
const firstKey = Object.keys(cucumberConfig.baseURL)[0];
|
|
15
|
+
baseURL = cucumberConfig.baseURL[firstKey];
|
|
19
16
|
}
|
|
20
17
|
} else {
|
|
21
18
|
baseURL = cucumberConfig.baseURL;
|
|
@@ -4,15 +4,12 @@ const cucumberConfig = require("../../../cucumber.config.js");
|
|
|
4
4
|
let baseURL = "";
|
|
5
5
|
|
|
6
6
|
if (typeof cucumberConfig.baseURL === "object") {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
cucumberConfig.env
|
|
10
|
-
cucumberConfig.env != null
|
|
11
|
-
) {
|
|
12
|
-
baseURL = cucumberConfig.baseURL[cucumberConfig.env.trim()];
|
|
7
|
+
const env = (cucumberConfig.env || "").trim();
|
|
8
|
+
if (env && cucumberConfig.baseURL.hasOwnProperty(env)) {
|
|
9
|
+
baseURL = cucumberConfig.baseURL[env];
|
|
13
10
|
} else {
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
const firstKey = Object.keys(cucumberConfig.baseURL)[0];
|
|
12
|
+
baseURL = cucumberConfig.baseURL[firstKey];
|
|
16
13
|
}
|
|
17
14
|
} else {
|
|
18
15
|
baseURL = cucumberConfig.baseURL;
|
|
@@ -20,6 +17,7 @@ if (typeof cucumberConfig.baseURL === "object") {
|
|
|
20
17
|
|
|
21
18
|
const requestContextOptions = {
|
|
22
19
|
baseURL: baseURL,
|
|
20
|
+
ignoreHTTPSErrors: true
|
|
23
21
|
};
|
|
24
22
|
|
|
25
23
|
async function invokeRequest() {
|
package/src/hooks/hooks.js
CHANGED
|
@@ -68,7 +68,7 @@ Before(async function () {
|
|
|
68
68
|
env_vars = JSON.parse(env_vars);
|
|
69
69
|
context.vars = { ...context.vars, ...env_vars };
|
|
70
70
|
} catch (err) {
|
|
71
|
-
console.
|
|
71
|
+
console.error("Error parsing environment variables JSON:", err);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|