froth-webdriverio-framework 0.1.42 → 0.1.44

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.
@@ -13,21 +13,21 @@ const commonconfig = {
13
13
  * @param {Object} config wdio configuration object
14
14
  * @param {Array.<Object>} capabilities list of capabilities details
15
15
  */
16
- onPrepare: function (capabilities, specs) {
16
+ onPrepare: async function (capabilities, specs) {
17
17
  // This code runs before the test suite starts
18
18
  console.log('Preparing for tests... IN ONPREPARE HOOK');
19
19
  console.log("organisation url" + process.env.organisation_url);
20
20
  console.log("test data id" + process.env.testdata_id);
21
21
  process.env.BUFFER = null;
22
22
  console.log("process.env.BUFFER in before " + process.env.BUFFER);
23
- const jsonobject = getDataById(process.env.organisation_url, process.env.testdata_id);
24
- // You can perform any setup tasks here
25
- global.myGlobalVariable = jsonobject;
26
- console.log("global variable " + global.myGlobalVariable);
27
- console.log("global variable2 " + myGlobalVariable);
28
-
23
+ const jsonobject = await getDataById(process.env.organisation_url, process.env.testdata_id);
24
+ if (jsonobject == null) {
25
+ console.log("Test data is not available");
26
+ }
27
+ else {
28
+ process.env.BUFFER = JSON.stringify(jsonobject);
29
+ }
29
30
 
30
- // If you need to perform asynchronous actions, use the 'beforeSession' hook instead
31
31
  },
32
32
 
33
33
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "0.1.42",
3
+ "version": "0.1.44",
4
4
  "readme": "WendriverIO Integration with [BrowserStack]",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",