froth-webdriverio-framework 0.1.46 → 0.1.47

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/api/loginapi.js CHANGED
@@ -19,8 +19,7 @@ async function login(email,password) {
19
19
 
20
20
  if (response.ok) {
21
21
  const data = await response.json();
22
- console.log('Login successful:', data);
23
- console.log('Token:', data.access_token);
22
+ // console.log('Token:', data.access_token);
24
23
  return data.access_token;
25
24
  } else {
26
25
  console.error('Login failed:', response.statusText);
@@ -11,7 +11,7 @@ const androidConfig = deepmerge.all([commonmobileconfig, {
11
11
  buildName: "ANDROID BUILD 1",
12
12
  buildIdentifier: process.env.BUILD_NUMBER || "default_build_identifier",
13
13
  browserstackLocal: true,
14
- opts: { forcelocal: false, localIdentifier: "webdriverio-appium" },
14
+ opts: { forcelocal: false },
15
15
  app: process.env.BROWSERSTACK_APP_PATH || 'bs://a224145c09eb22e67c21ef65b29d32ae7aa78bb0'
16
16
  }
17
17
  ]
@@ -29,16 +29,16 @@ const androidConfig = deepmerge.all([commonmobileconfig, {
29
29
 
30
30
  }]);
31
31
 
32
- console.log("Merged Android Config:", JSON.stringify(androidConfig, null, 2));
32
+ // console.log("Merged Android Config:", JSON.stringify(androidConfig, null, 2));
33
33
 
34
- androidConfig.capabilities.forEach(function (caps) {
35
- for (var i in androidConfig.commonCapabilities) {
36
- console.log("i:", i);
37
- console.log("caps[i]:", caps[i]);
38
- console.log("androidConfig.commonCapabilities[i]:", androidConfig.commonCapabilities[i]);
39
- caps[i] = caps[i] || androidConfig.commonCapabilities[i];
40
- }
41
- });
34
+ // androidConfig.capabilities.forEach(function (caps) {
35
+ // for (var i in androidConfig.commonCapabilities) {
36
+ // console.log("i:", i);
37
+ // console.log("caps[i]:", caps[i]);
38
+ // console.log("androidConfig.commonCapabilities[i]:", androidConfig.commonCapabilities[i]);
39
+ // caps[i] = caps[i] || androidConfig.commonCapabilities[i];
40
+ // }
41
+ // });
42
42
 
43
43
  module.exports = androidConfig;
44
44
 
@@ -5,11 +5,10 @@ const commonconfig = {
5
5
 
6
6
  onPrepare: async function (capabilities, specs) {
7
7
  // This code runs before the test suite starts
8
- console.log('Preparing for tests... IN ONPREPARE HOOK');
9
- console.log("organisation url" + process.env.organisation_url);
10
- console.log("test data id" + process.env.testdata_id);
8
+ // console.log("organisation url" + process.env.organisation_url);
9
+ // console.log("test data id" + process.env.testdata_id);
11
10
  process.env.BUFFER = null;
12
- console.log("process.env.BUFFER in before " + process.env.BUFFER);
11
+ // console.log("process.env.BUFFER in before " + process.env.BUFFER);
13
12
  const jsonobject = await getDataById(process.env.organisation_url, process.env.testdata_id);
14
13
  if (jsonobject == null) {
15
14
  console.log("Test data is not available");
@@ -58,9 +57,7 @@ const commonconfig = {
58
57
  // browser.takeScreenshot();
59
58
  // }
60
59
  },
61
- // afterTest: async function (test, context, { error, result, duration, passed, retries }) {
62
- // if (passed) { await browser.takeScreenshot() }
63
- // },
60
+
64
61
  /**
65
62
  * Function to be executed after a test (in Mocha/Jasmine only)
66
63
  * @param {object} test test object
@@ -75,6 +72,8 @@ const commonconfig = {
75
72
  console.log(`Test '${test.title}' finished.`);
76
73
  console.log(`Duration: ${duration}ms`);
77
74
  console.log(`Passed: ${passed}`);
75
+ if(passed)
76
+ console.log(`Result for '${test.title}' : ${result}`);
78
77
  if (error) {
79
78
  console.error(`Error: ${error.message}`);
80
79
  }
@@ -97,10 +96,10 @@ const commonconfig = {
97
96
  after: function (result, capabilities, specs) {
98
97
  console.log('All tests are done.');
99
98
  console.log(`Result: ${result === 0 ? 'Pass' : 'Fail'}`);
100
- console.log('Capabilities:');
101
- console.log(capabilities);
102
- console.log('Specs:');
103
- console.log(specs);
99
+ // console.log('Capabilities:');
100
+ // console.log(capabilities);
101
+ // console.log('Specs:');
102
+ // console.log(specs);
104
103
  },
105
104
 
106
105
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "readme": "WendriverIO Integration with [BrowserStack]",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",
@@ -35,6 +35,7 @@
35
35
  "appium-uiautomator2-driver": "^3.2.0",
36
36
  "browserstack-local": "^1.5.5",
37
37
  "deepmerge": "^4.3.1",
38
+
38
39
  "form-data": "^4.0.0",
39
40
  "node-fetch": "^3.3.2",
40
41
  "ts-node": "^10.9.2",