froth-webdriverio-framework 7.0.57 → 7.0.59

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.
@@ -36,7 +36,6 @@ module.exports = (bsCaps) => {
36
36
  debug: bsCaps.debug,
37
37
  networkLogs: bsCaps.networkLogs,
38
38
  interactiveDebugging: bsCaps.interactiveDebugging,
39
- // uploadMedia: ['media://da43e04f8f5e9def566059a8c4138e3ae648f1b8']
40
39
  }
41
40
  }],
42
41
 
@@ -178,26 +178,25 @@ const commonHooks = {
178
178
 
179
179
  if (process.env.MEDIA_FILES) {
180
180
  try {
181
- const media = JSON.parse(process.env.MEDIA_FILES);
182
- console.log('Total items:', media.length);
183
- if (media.length > 0) {
184
-
185
- // capabilities['bstack:options'].uploadMedia = media;
186
- // capabilities['bstack:options'].networkLogs = false;
187
- // capabilities['networkLogs'] = false
188
- // // capabilities['uploadMedia'] = media;
189
- // console.log('uploadMedia attached:', media)
190
- // bsOpts.uploadMedia = JSON.parse(process.env.MEDIA_FILES)
191
- //capabilities['browserstack.uploadMedia'] = media
181
+ console.log("env details for media -->" + process.env.MEDIA_FILES)
182
+ const media = JSON.parse(process.env.MEDIA_FILES).join(',');
183
+ process.env.BS_UPLOAD_MEDIA= media;
184
+ console.log("after comma separted "+ process.env.BS_UPLOAD_MEDIA)
185
+ // console.log('Total items:', media.length);
186
+ if (process.env.BS_UPLOAD_MEDIA) {
187
+ bsOpts.uploadMedia = process.env.BS_UPLOAD_MEDIA
188
+ .split(',')
189
+ .map(x => x.trim())
190
+
192
191
  console.log('Final capabilities:', JSON.stringify(capabilities, null, 2));
193
192
 
194
193
  }
195
- } catch (error){
196
- console.warn('⚠️ MEDIA_FILES is not valid JSON',error.message);
194
+ } catch (error) {
195
+ console.warn('⚠️ MEDIA_FILES is not valid JSON', error.message);
197
196
  }
198
197
  }
199
- // capabilities['bstack:options'] = bsOpts;
200
-
198
+ capabilities['bstack:options'] = bsOpts;
199
+
201
200
  }
202
201
  console.log('final cinfig dteials :' + JSON.stringify(capabilities))
203
202
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "7.0.57",
3
+ "version": "7.0.59",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",