froth-webdriverio-framework 0.1.44 → 0.1.45

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.
@@ -34,22 +34,18 @@ async function getDataById(frothUrl, id) {
34
34
  }, {});
35
35
  // Set the buffer as an environment variable
36
36
  const stringData = JSON.stringify(buffer);
37
- process.env.BUFFER = stringData;
38
- console.log('Buffer data:', process.env.BUFFER);
39
- // const data1 = JSON.parse(process.env.BUFFER);
40
- // console.log("Data1:", data1.sdfasd);
41
- return stringData;
37
+ console.log('JSON DATA : ', stringData);
38
+
39
+
40
+ return buffer;
42
41
 
43
42
 
44
43
  } catch (error) {
45
44
  console.error('Error fetching data:', error);
46
-
45
+
47
46
  }
48
47
  } else {
49
48
  console.error('Error fetching data: Invalid ID');
50
- process.env.BUFFER = '{"sdsf":"vlaue1","schbsaxa":"xbsahxash"}';
51
- const jsonobject = {"abc":"valueabc","def":"valuedef"};
52
- return jsonobject;
53
49
  }
54
50
 
55
51
  }
@@ -1,25 +1,25 @@
1
1
  const deepmerge = require('deepmerge')
2
2
  const commonmobileconfig = require('./common.mobile.conf');
3
3
 
4
- const androidConfig = deepmerge.all([commonmobileconfig,{
4
+ const androidConfig = deepmerge.all([commonmobileconfig, {
5
5
  services: [
6
6
  [
7
7
  'browserstack',
8
8
  {
9
9
  testObservability: true,
10
- buildIdentifier: process.env.BROWSERSTACK_BUILD_IDENTIFIER, // Optional and unique for each build
11
10
  buildName: "ANDROID BUILD 1",
11
+ buildIdentifier: "${BUILD_NUMBER}", // Optional and unique for each build
12
12
  browserstackLocal: true,
13
13
  opts: { forcelocal: false, localIdentifier: "webdriverio-appium" },
14
- app : process.env.BROWSERSTACK_APP_PATH || 'bs://a224145c09eb22e67c21ef65b29d32ae7aa78bb0'
14
+ app: process.env.BROWSERSTACK_APP_PATH || 'bs://a224145c09eb22e67c21ef65b29d32ae7aa78bb0'
15
15
  }
16
16
  ]
17
17
  ],
18
18
 
19
19
  capabilities: [{
20
20
  'bstack:options': {
21
- deviceName: process.env.DEVICENAME||'Samsung Galaxy A11',
22
- platformVersion: process.env.OSVERSION||'10.0',
21
+ deviceName: process.env.DEVICENAME || 'Samsung Galaxy A11',
22
+ platformVersion: process.env.OSVERSION || '10.0',
23
23
  platformName: 'android',
24
24
  interactiveDebugging: true
25
25
  }
@@ -28,6 +28,15 @@ const androidConfig = deepmerge.all([commonmobileconfig,{
28
28
 
29
29
  }]);
30
30
 
31
+ // androidConfig.capabilities.forEach(function (caps) {
32
+ // for (var i in androidConfig.commonCapabilities){
33
+ // console.log("i:", i);
34
+ // console.log("caps[i]:", caps[i]);
35
+ // console.log("androidConfig.commonCapabilities[i]:", androidConfig.commonCapabilities[i]);
36
+ // caps[i] = caps[i] || androidConfig.commonCapabilities[i];
37
+ // }
38
+ // });
39
+
31
40
  module.exports = androidConfig;
32
41
 
33
42
 
@@ -2,17 +2,7 @@ const getDataById = require("../api/readTestdata");
2
2
  // Description: This file contains the common configuration for the webdriverio framework.
3
3
  const commonconfig = {
4
4
 
5
- before: function (capabilities, specs) {
6
- // Code to run before the test suite starts
7
- console.log('Starting test suite IN EBFORE HOOK ...');
8
- // Initialize variables, configure environment, etc.
9
- },
10
-
11
- /**
12
- * Gets executed once before all workers get launched.
13
- * @param {Object} config wdio configuration object
14
- * @param {Array.<Object>} capabilities list of capabilities details
15
- */
5
+
16
6
  onPrepare: async function (capabilities, specs) {
17
7
  // This code runs before the test suite starts
18
8
  console.log('Preparing for tests... IN ONPREPARE HOOK');
@@ -30,6 +20,13 @@ const commonconfig = {
30
20
 
31
21
  },
32
22
 
23
+ before: function (capabilities, specs) {
24
+ // Code to run before the test suite starts
25
+ console.log('Starting test suite IN EBFORE HOOK ...');
26
+ // Initialize variables, configure environment, etc.
27
+ },
28
+
29
+
33
30
  /**
34
31
  * Gets executed before the suite starts (in Mocha/Jasmine only).
35
32
  * @param {object} suite suite details
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "0.1.44",
3
+ "version": "0.1.45",
4
4
  "readme": "WendriverIO Integration with [BrowserStack]",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",