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.
- package/config/commonconfig.js +8 -8
- package/package.json +1 -1
package/config/commonconfig.js
CHANGED
|
@@ -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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
/**
|