froth-webdriverio-framework 7.0.82 → 7.0.83

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.
@@ -70,12 +70,17 @@ exports.config = (async () => {
70
70
  : require('./local/mobile.config');
71
71
  }
72
72
 
73
+ let envConfigObj = envConfig(bsCaps); // call to get config object
74
+
75
+ envConfigObj = await getBrowserStackCapabilities(envConfigObj);
76
+
77
+
73
78
  // Inject BrowserStack media files
74
- function getBrowserStackCapabilities(baseCaps) {
79
+ async function getBrowserStackCapabilities(baseCaps) {
75
80
  const isArray = Array.isArray(baseCaps);
76
81
  const capsArray = isArray ? baseCaps : [baseCaps];
77
82
 
78
- const updatedCaps = capsArray.map((capability) => {
83
+ const updatedCaps = capsArray.map(async (capability) => {
79
84
  capability['bstack:options'] = capability['bstack:options'] || {};
80
85
  const bsOpts = capability['bstack:options'];
81
86
 
@@ -93,13 +98,11 @@ exports.config = (async () => {
93
98
  return capability;
94
99
  });
95
100
 
96
- return isArray ? updatedCaps : updatedCaps[0];
101
+ // return isArray ? updatedCaps : updatedCaps[0];
97
102
  }
98
103
 
99
- envConfig = await getBrowserStackCapabilities(envConfig);
100
-
101
104
  // Merge with base config
102
- return deepmerge(baseConfig, envConfig(bsCaps));
105
+ return deepmerge(baseConfig, envConfigObj);
103
106
  })();
104
107
  // // --------------------
105
108
  // // Inject media files into BrowserStack capabilities
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "7.0.82",
3
+ "version": "7.0.83",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",