froth-webdriverio-framework 0.1.41 → 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 +5 -2
- 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
|
@@ -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
|
},
|