artes 1.1.27 → 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;
|
package/src/hooks/hooks.js
CHANGED
|
@@ -70,8 +70,6 @@ Before(async function () {
|
|
|
70
70
|
} catch (err) {
|
|
71
71
|
console.error("Error parsing environment variables JSON:", err);
|
|
72
72
|
}
|
|
73
|
-
}else{
|
|
74
|
-
console.error(`Environment file not found: ${envFilePath}`);
|
|
75
73
|
}
|
|
76
74
|
|
|
77
75
|
const { browser, context: browserContext } = await invokeBrowser();
|