froth-webdriverio-framework 0.1.35 → 0.1.37

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.
@@ -47,7 +47,7 @@ async function getDataById(frothUrl, id) {
47
47
  }
48
48
  } else {
49
49
  console.error('Error fetching data: Invalid ID');
50
- process.env.BUFFER = "0sdsf";
50
+ process.env.BUFFER = '{"sdsf":"vlaue1","schbsaxa":"xbsahxash"}';
51
51
  }
52
52
 
53
53
  }
@@ -1,17 +1,36 @@
1
+ const getDataById = require("../api/readTestdata");
1
2
  // Description: This file contains the common configuration for the webdriverio framework.
2
- const readTestData = require('../api/readTestdata.js');
3
3
  const commonconfig = {
4
+
5
+ /**
6
+ * Gets executed once before all workers get launched.
7
+ * @param {Object} config wdio configuration object
8
+ * @param {Array.<Object>} capabilities list of capabilities details
9
+ */
10
+ before: function (config, capabilities) {
11
+ // This code runs before the test suite starts
12
+ console.log('Preparing for tests...');
13
+ console.log("organisation url" + process.env.organisation_url);
14
+ console.log("test data id" + process.env.testdata_id);
15
+ process.env.BUFFER = null;
16
+ console.log("process.env.BUFFER in before " + process.env.BUFFER);
17
+ getDataById(process.env.organisation_url, process.env.testdata_id);
18
+ // You can perform any setup tasks here
19
+ global.myGlobalVariable = 'Some value';
20
+
21
+ // If you need to perform asynchronous actions, use the 'beforeSession' hook instead
22
+ },
23
+
4
24
  /**
5
25
  * Gets executed before the suite starts (in Mocha/Jasmine only).
6
26
  * @param {object} suite suite details
7
27
  */
8
28
  beforeSuite: function (suite) {
9
- try{
10
- console.log("Running suite:", suite.title);
11
- console.log("Reading test data from the API");
12
- // readTestData(process.env.organisation_url, process.env.testdata_id);
13
-
14
- }catch(e){
29
+ try {
30
+ console.log("Running suite:", suite.title);
31
+ console.log("Reading test data from the API");
32
+
33
+ } catch (e) {
15
34
  console.log("Error in beforeSuite:", e);
16
35
  }
17
36
  },
@@ -80,4 +99,4 @@ const commonconfig = {
80
99
 
81
100
  };
82
101
 
83
- module.exports = commonconfig;
102
+ module.exports = { commonconfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "0.1.35",
3
+ "version": "0.1.37",
4
4
  "readme": "WendriverIO Integration with [BrowserStack]",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",