froth-webdriverio-framework 7.0.56 → 7.0.58
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.
|
@@ -178,26 +178,23 @@ const commonHooks = {
|
|
|
178
178
|
|
|
179
179
|
if (process.env.MEDIA_FILES) {
|
|
180
180
|
try {
|
|
181
|
+
console.log("env details for media -->" + process.env.MEDIA_FILES)
|
|
181
182
|
const media = JSON.parse(process.env.MEDIA_FILES);
|
|
182
183
|
console.log('Total items:', media.length);
|
|
183
184
|
if (media.length > 0) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
// // capabilities['uploadMedia'] = media;
|
|
189
|
-
// console.log('uploadMedia attached:', media)
|
|
190
|
-
// bsOpts.uploadMedia = JSON.parse(process.env.MEDIA_FILES)
|
|
191
|
-
capabilities['browserstack.uploadMedia'] = media
|
|
185
|
+
bsOpts.uploadMedia = process.env.BS_UPLOAD_MEDIA
|
|
186
|
+
.split(',')
|
|
187
|
+
.map(x => x.trim());
|
|
188
|
+
|
|
192
189
|
console.log('Final capabilities:', JSON.stringify(capabilities, null, 2));
|
|
193
190
|
|
|
194
191
|
}
|
|
195
|
-
} catch (error){
|
|
196
|
-
console.warn('⚠️ MEDIA_FILES is not valid JSON',error.message);
|
|
192
|
+
} catch (error) {
|
|
193
|
+
console.warn('⚠️ MEDIA_FILES is not valid JSON', error.message);
|
|
197
194
|
}
|
|
198
195
|
}
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
capabilities['bstack:options'] = bsOpts;
|
|
197
|
+
|
|
201
198
|
}
|
|
202
199
|
console.log('final cinfig dteials :' + JSON.stringify(capabilities))
|
|
203
200
|
|