froth-webdriverio-framework 3.0.134 → 3.0.135

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.
@@ -22,7 +22,7 @@ async function getSuiteDetails(frothUrl, token, id) {
22
22
  jsondata.automation_suite_id = data.id == null ? 0 : data.id;
23
23
  jsondata.automation_suite_name = data.automation_suite_name == null ? "" : data.automation_suite_name;
24
24
  jsondata.test_data_id = data.test_data_id == null ? 0 : data.test_data_id;
25
- // jsondata.browser_stack_urls = data.browser_stack_urls == null ? "" : data.browser_stack_urls;
25
+ // jsondata.browser_stack_urls = data.browser_stack_urls == null ? "" : data.browser_stack_urls;
26
26
  jsondata.script_details = data.script_details == null ? [] : data.script_details;
27
27
  // console.log("automation_script_id:" + JSON.stringify(jsondata.automation_script_id))
28
28
  // const automationScripts = jsondata.script_details.reduce((obj, item) => {
@@ -35,21 +35,17 @@ async function getSuiteDetails(frothUrl, token, id) {
35
35
  jsondata.test_sequence = data.test_sequence;
36
36
  // console.log("automation_script_ details:" + JSON.stringify(BUFFER))
37
37
 
38
- console.log("json data :" + JSON.stringify(jsondata));
38
+ console.log("json data :" + JSON.stringify(jsondata));
39
+
39
40
 
40
- return jsondata;
41
41
 
42
42
  } else if (response.status === 401) { // Unauthorized, token expired
43
- // Call login function to obtain a new token
44
- // const newToken = await getLoginToken(BUFFER.getItem("SERVICE_USER"), BUFFER.getItem("SERVICE_PASSWORD")); // You need to implement the login function
45
- // // Retry the request with the new token
46
- // return getSuiteDetails(frothUrl, newToken, id);
43
+
47
44
  console.log("Unauthorized, token expired" + response.status)
48
45
  }
49
46
  else {
50
47
  const errorText = await response.text();
51
48
  console.error(`Data fetch failed response in getSuiteDetails: ${response.status}`);
52
- // throw new Error(`HTTP error! status: ${response.status}`);
53
49
  }
54
50
 
55
51
 
@@ -58,10 +54,11 @@ async function getSuiteDetails(frothUrl, token, id) {
58
54
  console.error('Error fetching data:', error);
59
55
 
60
56
  }
57
+
61
58
  } else {
62
59
  console.error('Error fetching data: Invalid ID or no suite id is linked to execution');
63
60
  }
64
-
61
+ return jsondata;
65
62
  }
66
63
 
67
64
  // async function main() {
@@ -155,7 +155,7 @@ const commonconfig = {
155
155
 
156
156
  // scriptresult = "FAILED"
157
157
  }
158
- console.log("suite info:", suite_info)
158
+ console.log("suite info:", JSON.stringify(suite_info))
159
159
  const jwtScript = suite_info.script_details.find(script => script.scriptName === fileName.replace(".js", ""));
160
160
  console.log("jwtScript:", jwtScript);
161
161
  if (jwtScript) {
@@ -77,6 +77,7 @@ async function setSuiteDetails() {
77
77
  try {
78
78
  const getSuiteDetail = await getSuiteDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), process.env.AUTOMATION_SUITE_ID);
79
79
  // process.env.BROWSERSTACK_APP_PATH = getSuiteDetail.browser_stack_urls;
80
+ console.log("Suite Details:", JSON.stringify(getSuiteDetail));
80
81
  process.env.TESTDATA_ID = getSuiteDetail.test_data_id;
81
82
  return getSuiteDetail;
82
83
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "3.0.134",
3
+ "version": "3.0.135",
4
4
 
5
5
  "readme": "WebdriverIO Integration",
6
6
  "description": "WebdriverIO and BrowserStack App Automate",