froth-webdriverio-framework 3.0.18 → 3.0.20

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.
@@ -2,7 +2,7 @@
2
2
  async function getBSBuildDetails(sessiontype, bs_username, bs_pwd) {
3
3
  try {
4
4
  // const sessionId = sessionIdd;
5
- console.log("sessiontype:"+sessiontype)
5
+ console.log("sessiontype:" + sessiontype)
6
6
  const username = bs_username;
7
7
  const accessKey = bs_pwd;
8
8
  const basicAuth = btoa(`${username}:${accessKey}`);
@@ -24,7 +24,7 @@ async function getBSBuildDetails(sessiontype, bs_username, bs_pwd) {
24
24
 
25
25
  if (response.ok) {
26
26
  const data = await response.json();
27
- console.log("session build_data:"+JSON.stringify(data))
27
+ console.log("session build_data:" + JSON.stringify(data))
28
28
  // Accessing the public_url property
29
29
  hashed_id = data[0].automation_build.hashed_id;
30
30
 
@@ -57,11 +57,11 @@ async function getBSSessionDetails(sessiontype, bs_username, bs_pwd) {
57
57
 
58
58
  const hash_id = await getBSBuildDetails(sessiontype, bs_username, accessKey)
59
59
  // const sessionid = BUFFER.getItem("SESSION_ID");
60
- console.log("hash_id"+hash_id)
60
+ console.log("hash_id" + hash_id)
61
61
 
62
62
  // const url = `https://api.browserstack.com/${sessiontype}/sessions/${sessionid}.json`;
63
63
  const url = `https://api.browserstack.com/${sessiontype}/builds/${hash_id}/sessions.json`;
64
-
64
+ console.log("url:" + url)
65
65
  const response = await fetch(url, {
66
66
  method: 'GET',
67
67
  headers: {
@@ -70,7 +70,7 @@ async function getExecuitonScriptDetails(frothUrl, token, execution_id, script_i
70
70
  });
71
71
  if (response.ok) {
72
72
  const data = await response.json();
73
- // console.log(data)
73
+ // console.log(data)
74
74
  id = data[0].id;
75
75
  console.log("ID is :" + id)
76
76
  // console.log("json data :" + JSON.stringify(jsondata));
@@ -113,6 +113,7 @@ async function updateExecuitonDetails(frothUrl, token, id, resultdetails) {
113
113
  }
114
114
  formData.append('id', BUFFER.getItem("FROTH_EXECUTION_ID"))
115
115
  formData.append('report_url', BUFFER.getItem("REPORT_URL"))
116
+ console.log("Report URL:" + BUFFER.getItem("REPORT_URL"))
116
117
 
117
118
  const response = await fetch(url, {
118
119
  method: 'PUT',
@@ -155,6 +156,7 @@ async function updateScriptExecutionStatus(frothUrl, token, scriptid, status) {
155
156
  if (scriptid != 0) {
156
157
  try {
157
158
  const id = await getExecuitonScriptDetails(frothUrl, token, BUFFER.getItem("FROTH_EXECUTION_ID"), scriptid)
159
+ console.log("ID is :" + id)
158
160
  const url = `${frothUrl}/api/script-status-percentage/${id}/`;
159
161
  const formData = new FormData();
160
162
 
@@ -113,9 +113,9 @@ const commonconfig = {
113
113
  * @param {Array.<Object>} capabilities list of capabilities details
114
114
  * @param {Array.<String>} specs List of spec file paths that ran
115
115
  */
116
- after: async function (result, config,capabilities, specs) {
116
+ after: async function (result, config, capabilities, specs) {
117
117
  console.log('All tests are done.' + result);
118
-
118
+
119
119
 
120
120
  const totalDefinedTests = config.specs.length; // Total test files/specs defined
121
121
  const executedTests = result.finished; // Tests that were executed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "3.0.18",
3
+ "version": "3.0.20",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",