froth-webdriverio-framework 0.1.40 → 0.1.42
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.
- package/api/readTestdata.js +2 -0
- package/config/commonconfig.js +7 -4
- package/package.json +1 -1
package/api/readTestdata.js
CHANGED
|
@@ -48,6 +48,8 @@ async function getDataById(frothUrl, id) {
|
|
|
48
48
|
} else {
|
|
49
49
|
console.error('Error fetching data: Invalid ID');
|
|
50
50
|
process.env.BUFFER = '{"sdsf":"vlaue1","schbsaxa":"xbsahxash"}';
|
|
51
|
+
const jsonobject = {"abc":"valueabc","def":"valuedef"};
|
|
52
|
+
return jsonobject;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
}
|
package/config/commonconfig.js
CHANGED
|
@@ -7,7 +7,7 @@ const commonconfig = {
|
|
|
7
7
|
console.log('Starting test suite IN EBFORE HOOK ...');
|
|
8
8
|
// Initialize variables, configure environment, etc.
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
/**
|
|
12
12
|
* Gets executed once before all workers get launched.
|
|
13
13
|
* @param {Object} config wdio configuration object
|
|
@@ -20,9 +20,12 @@ const commonconfig = {
|
|
|
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
|
-
getDataById(process.env.organisation_url, process.env.testdata_id);
|
|
23
|
+
const jsonobject = getDataById(process.env.organisation_url, process.env.testdata_id);
|
|
24
24
|
// You can perform any setup tasks here
|
|
25
|
-
global.myGlobalVariable =
|
|
25
|
+
global.myGlobalVariable = jsonobject;
|
|
26
|
+
console.log("global variable " + global.myGlobalVariable);
|
|
27
|
+
console.log("global variable2 " + myGlobalVariable);
|
|
28
|
+
|
|
26
29
|
|
|
27
30
|
// If you need to perform asynchronous actions, use the 'beforeSession' hook instead
|
|
28
31
|
},
|
|
@@ -105,4 +108,4 @@ const commonconfig = {
|
|
|
105
108
|
|
|
106
109
|
};
|
|
107
110
|
|
|
108
|
-
module.exports =
|
|
111
|
+
module.exports = commonconfig;
|