froth-webdriverio-framework 1.0.7 → 1.0.8
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.
|
@@ -25,6 +25,10 @@ async function getExecuitonDetails(frothUrl, token, id) {
|
|
|
25
25
|
console.log(data)
|
|
26
26
|
jsondata.automation_suite_id = data.automation_suite_id;
|
|
27
27
|
jsondata.test_cycle_id = data.test_cycle_id;
|
|
28
|
+
if (data.testcycle_type === "Android" || data.testcycle_type === "Ios") {
|
|
29
|
+
jsondata.device_name = data.device_name
|
|
30
|
+
jsondata.version = data.version
|
|
31
|
+
}
|
|
28
32
|
console.log("json data :" + JSON.stringify(jsondata));
|
|
29
33
|
|
|
30
34
|
return jsondata;
|
|
@@ -61,8 +65,8 @@ async function updateExecuitonDetails(frothUrl, token, id, resultdetails) {
|
|
|
61
65
|
formData.append('excution_status', resultdetails.excution_status);
|
|
62
66
|
formData.append('excution_time', resultdetails.excution_time);
|
|
63
67
|
formData.append('id', BUFFER.getItem("EXECUTION_ID"))
|
|
64
|
-
formData.append('report_url',BUFFER.getItem("REPORT_URL"))
|
|
65
|
-
|
|
68
|
+
formData.append('report_url', BUFFER.getItem("REPORT_URL"))
|
|
69
|
+
|
|
66
70
|
const response = await fetch(url, {
|
|
67
71
|
method: 'PUT',
|
|
68
72
|
headers: {
|
|
@@ -80,7 +84,7 @@ async function updateExecuitonDetails(frothUrl, token, id, resultdetails) {
|
|
|
80
84
|
// Call login function to obtain a new token
|
|
81
85
|
const newToken = await getLoginToken(BUFFER.getItem("SERVICE_USER"), BUFFER.getItem("SERVICE_PASSWORD")); // You need to implement the login function
|
|
82
86
|
// Retry the request with the new token
|
|
83
|
-
return updateExecuitonDetails(frothUrl, newToken, id,resultdetails);
|
|
87
|
+
return updateExecuitonDetails(frothUrl, newToken, id, resultdetails);
|
|
84
88
|
} else {
|
|
85
89
|
const errorText = await response.text();
|
|
86
90
|
console.error('Data fetch failed response:', errorText);
|
package/config/commonconfig.js
CHANGED
|
@@ -104,7 +104,7 @@ const commonconfig = {
|
|
|
104
104
|
resultdetails.excution_status = resultdata === 'Pass' ? 'PASSED' : 'FAILED'
|
|
105
105
|
resultdetails.excution_time = convertMillisecondsToTime(BUFFER.getItem("TOTAL_DURATION"))
|
|
106
106
|
exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("LOGIN_TOKEN"), BUFFER.getItem("EXECUTION_ID"), resultdetails)
|
|
107
|
-
|
|
107
|
+
// BUFFER.clear();
|
|
108
108
|
console.log('Local storage has been cleared.');
|
|
109
109
|
// console.log('Capabilities:');
|
|
110
110
|
// console.log(capabilities);
|
|
@@ -31,6 +31,10 @@ async function setExecutionDetails() {
|
|
|
31
31
|
try {
|
|
32
32
|
const getExeDetails = await exeDetails.getExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), process.env.LOGIN_TOKEN, BUFFER.getItem("EXECUTION_ID"));
|
|
33
33
|
BUFFER.setItem("AUTOMATION_SUITE_ID", getExeDetails.automation_suite_id);
|
|
34
|
+
process.env.DEVICENAME=getExeDetails.device_name
|
|
35
|
+
process.env.OSVERSION=getExeDetails.version
|
|
36
|
+
BUFFER.setItem("DEVICE_NAME", getExeDetails.device_name);
|
|
37
|
+
BUFFER.setItem("VERSION", getExeDetails.version);
|
|
34
38
|
|
|
35
39
|
} catch (error) {
|
|
36
40
|
// console.error('Error in main function:', error);
|