froth-webdriverio-framework 5.0.10 → 5.0.11
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.
|
@@ -9,6 +9,8 @@ const exeDetails = require("../froth_api_calls/getexecutionDetails")
|
|
|
9
9
|
const { fail } = require("assert");
|
|
10
10
|
const { error } = require('console');
|
|
11
11
|
const HTMLReportGenerator = require('wdio-json-html-reporter').HTMLReportGenerator;
|
|
12
|
+
require('froth-webdriverio-framework/globalUtilShim');
|
|
13
|
+
|
|
12
14
|
let Util;
|
|
13
15
|
|
|
14
16
|
//const isBrowserStackEnabled = process.env.BROWSERSTACK;
|
|
@@ -165,34 +167,10 @@ const commonconfig = {
|
|
|
165
167
|
|
|
166
168
|
console.log("🔧 Initializing environment setup...");
|
|
167
169
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
// 🟢 Local setup — dependency folder outside project
|
|
174
|
-
path.resolve(process.cwd(), '../DEPENDENCY/node_modules/froth-webdriverio-framework/froth_common_actions/Utils'),
|
|
175
|
-
|
|
176
|
-
// 🟢 Another possible relative structure (if nested differently)
|
|
177
|
-
path.resolve(process.cwd(), '../../DEPENDENCY/node_modules/froth-webdriverio-framework/froth_common_actions/Utils'),
|
|
178
|
-
];
|
|
179
|
-
|
|
180
|
-
// Try to locate and load the Utils module
|
|
181
|
-
for (const filePath of possiblePaths) {
|
|
182
|
-
if (fs.existsSync(filePath + '.js')) {
|
|
183
|
-
Util = require(filePath);
|
|
184
|
-
global.Util = Util;
|
|
185
|
-
console.log(`✅ Utils loaded successfully from: ${filePath}`);
|
|
186
|
-
break;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
if (!global.Util) {
|
|
191
|
-
console.error('❌ Could not find froth_common_actions/Utils in expected paths:');
|
|
192
|
-
possiblePaths.forEach(p => console.error(' - ' + p));
|
|
193
|
-
throw new Error('Failed to load Utils. Check dependency installation path.');
|
|
194
|
-
}
|
|
195
|
-
|
|
170
|
+
global.require = (p) => {
|
|
171
|
+
if (p.includes('froth_common_actions/Utils')) return global.Util;
|
|
172
|
+
return module.constructor.prototype.require.call(this, p);
|
|
173
|
+
};
|
|
196
174
|
},
|
|
197
175
|
|
|
198
176
|
/**
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const possiblePaths = [
|
|
5
|
+
path.resolve(process.cwd(), 'node_modules/froth-webdriverio-framework/froth_common_actions/Utils'),
|
|
6
|
+
path.resolve(process.cwd(), '../DEPENDENCY/node_modules/froth-webdriverio-framework/froth_common_actions/Utils'),
|
|
7
|
+
path.resolve(process.cwd(), '../../DEPENDENCY/node_modules/froth-webdriverio-framework/froth_common_actions/Utils'),
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
for (const filePath of possiblePaths) {
|
|
11
|
+
if (fs.existsSync(filePath + '.js')) {
|
|
12
|
+
global.Util = require(filePath);
|
|
13
|
+
console.log(`✅ Global Util loaded from: ${filePath}`);
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (!global.Util) {
|
|
19
|
+
console.error('❌ Could not load global Util from known paths');
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "froth-webdriverio-framework",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.11",
|
|
4
4
|
"readme": "WebdriverIO Integration",
|
|
5
5
|
"description": "WebdriverIO and BrowserStack App Automate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"deepmerge": "^4.3.1",
|
|
44
44
|
"express": "^5.1.0",
|
|
45
45
|
"form-data": "^4.0.0",
|
|
46
|
-
"froth-webdriverio-framework": "^5.0.
|
|
46
|
+
"froth-webdriverio-framework": "^5.0.10",
|
|
47
47
|
"fs": "^0.0.1-security",
|
|
48
48
|
"js-yaml": "^4.1.0",
|
|
49
49
|
"mysql2": "^3.10.2",
|