froth-webdriverio-framework 7.0.65 → 7.0.67
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/froth_configs/commonhook.js +18 -11
- package/package.json +1 -1
|
@@ -159,10 +159,13 @@ const commonHooks = {
|
|
|
159
159
|
/** 2️⃣ BrowserStack capability normalization */
|
|
160
160
|
|
|
161
161
|
if (process.env.PLATFORM === 'browserstack' || process.env.PLATFORM === 'browserstacklocal') {
|
|
162
|
-
|
|
162
|
+
/** 🔍 Print raw capabilities first */
|
|
163
|
+
console.log('🟡 Raw Capabilities (Before):');
|
|
164
|
+
console.log(JSON.stringify(capabilities, null, 2));
|
|
163
165
|
const bsOpts = capabilities['bstack:options'] || {};
|
|
164
|
-
|
|
165
|
-
console.log('
|
|
166
|
+
/** 🔍 Print existing BS options */
|
|
167
|
+
console.log('🟢 Existing bstack:options (Before Modification):');
|
|
168
|
+
console.log(JSON.stringify(bsOpts, null, 2));
|
|
166
169
|
|
|
167
170
|
if (process.env.BS_SESSION_TYPE === 'app-automate') {
|
|
168
171
|
const appPath = process.env.BROWSERSTACK_APP_PATH;
|
|
@@ -176,22 +179,26 @@ const commonHooks = {
|
|
|
176
179
|
|
|
177
180
|
}
|
|
178
181
|
/** Media upload */
|
|
182
|
+
/** 📦 Media upload (from DB → ENV → capabilities) */
|
|
179
183
|
if (process.env.MEDIA_FILES) {
|
|
180
184
|
try {
|
|
181
|
-
const
|
|
182
|
-
console.log(
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
|
|
185
|
+
const mediaList = JSON.parse(process.env.MEDIA_FILES);
|
|
186
|
+
console.log("media files are", mediaList)
|
|
187
|
+
if (Array.isArray(mediaList) && mediaList.length > 0) {
|
|
188
|
+
bsOpts.uploadMedia = mediaList;
|
|
189
|
+
console.log('✅ uploadMedia injected:', mediaList);
|
|
186
190
|
}
|
|
187
|
-
} catch {
|
|
188
|
-
console.warn('⚠️ MEDIA_FILES is not valid JSON');
|
|
191
|
+
} catch (err) {
|
|
192
|
+
console.warn('⚠️ MEDIA_FILES is not valid JSON', err);
|
|
189
193
|
}
|
|
190
194
|
}
|
|
191
195
|
capabilities['bstack:options'] = bsOpts;
|
|
196
|
+
/** 🔍 Print final BS options */
|
|
197
|
+
console.log('🔵 Final bstack:options (After Modification):');
|
|
198
|
+
console.log(JSON.stringify(capabilities['bstack:options'], null, 2));
|
|
192
199
|
|
|
193
200
|
}
|
|
194
|
-
console.log('
|
|
201
|
+
console.log('🔎 Final capabilities:', JSON.stringify(capabilities, null, 2));
|
|
195
202
|
|
|
196
203
|
// console.log("config details " + JSON.stringify(config))
|
|
197
204
|
|