froth-webdriverio-framework 0.1.45 → 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 +1 -2
- package/config/android.conf.js +7 -4
- package/config/commonconfig.js +10 -11
- package/package.json +2 -1
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
|
-
|
|
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);
|
package/config/android.conf.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const deepmerge = require('deepmerge')
|
|
2
2
|
const commonmobileconfig = require('./common.mobile.conf');
|
|
3
|
+
console.log("BUILD_NUMBER:", process.env.BUILD_NUMBER);
|
|
3
4
|
|
|
4
5
|
const androidConfig = deepmerge.all([commonmobileconfig, {
|
|
5
6
|
services: [
|
|
@@ -8,9 +9,9 @@ const androidConfig = deepmerge.all([commonmobileconfig, {
|
|
|
8
9
|
{
|
|
9
10
|
testObservability: true,
|
|
10
11
|
buildName: "ANDROID BUILD 1",
|
|
11
|
-
buildIdentifier:
|
|
12
|
+
buildIdentifier: process.env.BUILD_NUMBER || "default_build_identifier",
|
|
12
13
|
browserstackLocal: true,
|
|
13
|
-
opts: { forcelocal: false
|
|
14
|
+
opts: { forcelocal: false },
|
|
14
15
|
app: process.env.BROWSERSTACK_APP_PATH || 'bs://a224145c09eb22e67c21ef65b29d32ae7aa78bb0'
|
|
15
16
|
}
|
|
16
17
|
]
|
|
@@ -28,11 +29,13 @@ const androidConfig = deepmerge.all([commonmobileconfig, {
|
|
|
28
29
|
|
|
29
30
|
}]);
|
|
30
31
|
|
|
32
|
+
// console.log("Merged Android Config:", JSON.stringify(androidConfig, null, 2));
|
|
33
|
+
|
|
31
34
|
// androidConfig.capabilities.forEach(function (caps) {
|
|
32
|
-
// for (var i in androidConfig.commonCapabilities){
|
|
35
|
+
// for (var i in androidConfig.commonCapabilities) {
|
|
33
36
|
// console.log("i:", i);
|
|
34
37
|
// console.log("caps[i]:", caps[i]);
|
|
35
|
-
//
|
|
38
|
+
// console.log("androidConfig.commonCapabilities[i]:", androidConfig.commonCapabilities[i]);
|
|
36
39
|
// caps[i] = caps[i] || androidConfig.commonCapabilities[i];
|
|
37
40
|
// }
|
|
38
41
|
// });
|
package/config/commonconfig.js
CHANGED
|
@@ -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(
|
|
9
|
-
console.log("
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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.
|
|
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",
|