froth-webdriverio-framework 7.0.89 → 7.0.90

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.
@@ -2,15 +2,22 @@ const commonHooks = require('../commonhook');
2
2
 
3
3
  // 🔹 parse comma-separated BS_UPLOAD_MEDIA
4
4
  let uploadMediaList;
5
- if (process.env.BS_UPLOAD_MEDIA!=null||process.env.BS_UPLOAD_MEDIA!='null'||process.env.BS_UPLOAD_MEDIA!='') {
6
- uploadMediaList = process.env.BS_UPLOAD_MEDIA
5
+ const rawMedia = process.env.BS_UPLOAD_MEDIA;
6
+ const DISABLED_VALUES = ['NONE', 'null', 'undefined', ''];
7
+ console.log('BS_UPLOAD_MEDIA raw =', rawMedia);
8
+
9
+ // Only proceed if value is valid
10
+ if (
11
+ rawMedia &&
12
+ !DISABLED_VALUES.includes(rawMedia)
13
+ ) {
14
+
15
+ uploadMediaList = rawMedia
7
16
  .split(',')
8
17
  .map(v => v.trim())
9
18
  .filter(Boolean);
10
19
 
11
- if (uploadMediaList.length === 0) {
12
- uploadMediaList = 'undefined';
13
- }
20
+ console.log('Parsed uploadMedia =', uploadMediaList);
14
21
  }
15
22
 
16
23
  module.exports = (bsCaps) => {
@@ -28,7 +35,8 @@ module.exports = (bsCaps) => {
28
35
  };
29
36
 
30
37
  // 🔹 conditionally add uploadMedia
31
- if (uploadMediaList) {
38
+ // Conditionally add uploadMedia
39
+ if (uploadMediaList?.length) {
32
40
  bstackOptions.uploadMedia = uploadMediaList;
33
41
  }
34
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "7.0.89",
3
+ "version": "7.0.90",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",