froth-webdriverio-framework 3.0.54 → 3.0.56
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/commonMethods/apicall.js +8 -6
- package/package.json +1 -1
package/commonMethods/apicall.js
CHANGED
|
@@ -32,9 +32,11 @@ async function callapi(method, api_url, queryParams, payloaddetails, authenticat
|
|
|
32
32
|
// Send the request
|
|
33
33
|
response = await fetch(api_url, options);
|
|
34
34
|
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
35
|
+
} catch (error) {
|
|
37
36
|
console.error('Error during API call in call api menthod:', error);
|
|
37
|
+
let annotationMessage = 'Error during API call:' + error.response ? error.response.data : error.message;
|
|
38
|
+
// if (process.env.BROWSERSTACK)
|
|
39
|
+
await amendToBrowserstack(annotationMessage, "error");
|
|
38
40
|
}
|
|
39
41
|
return response;
|
|
40
42
|
}
|
|
@@ -73,7 +75,7 @@ async function formheaders(authentication, headers) {
|
|
|
73
75
|
} catch (e) {
|
|
74
76
|
|
|
75
77
|
console.error('Error in formheaders:', e);
|
|
76
|
-
let annotationMessage = 'Error during API call:'+ error.response ? error.response.data : error.message;
|
|
78
|
+
let annotationMessage = 'Error during API call:' + error.response ? error.response.data : error.message;
|
|
77
79
|
|
|
78
80
|
}
|
|
79
81
|
return headers;
|
|
@@ -84,7 +86,7 @@ async function validate(attribute_name, attribute, actionname, buffer, buffernam
|
|
|
84
86
|
try {
|
|
85
87
|
|
|
86
88
|
if (actionname.toLowerCase() == "verify") {
|
|
87
|
-
await validateAttributeData(attribute_name,attribute,buffer, buffername_value, datatype);
|
|
89
|
+
await validateAttributeData(attribute_name, attribute, buffer, buffername_value, datatype);
|
|
88
90
|
} else if (actionname.toLowerCase() == "setbuffer") {
|
|
89
91
|
BUFFER.setItem(buffername_value, attribute);
|
|
90
92
|
} else if (actionname.toLowerCase() == "getbuffer") {
|
|
@@ -92,11 +94,11 @@ async function validate(attribute_name, attribute, actionname, buffer, buffernam
|
|
|
92
94
|
}
|
|
93
95
|
} catch (e) {
|
|
94
96
|
console.error('Error in validate method:', e);
|
|
95
|
-
|
|
97
|
+
|
|
96
98
|
}
|
|
97
99
|
}
|
|
98
100
|
|
|
99
|
-
async function validateAttributeData(attribute_name,attribute,buffer, buffername_value, datatype) {
|
|
101
|
+
async function validateAttributeData(attribute_name, attribute, buffer, buffername_value, datatype) {
|
|
100
102
|
let assertionStatus = false; // Initialize status
|
|
101
103
|
let valueToVerify;
|
|
102
104
|
|