froth-webdriverio-framework 2.0.41 → 2.0.43
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/browsersatckSessionInfo.js +1 -1
- package/config/android.conf.js +4 -0
- package/config/api.conf.bs.js +2 -0
- package/config/api.conf.js +3 -1
- package/config/common.mobile.conf.js +25 -12
- package/config/commonconfig.js +7 -4
- package/config/ios.conf.js +3 -0
- package/config/web.conf.bs.js +3 -0
- package/package.json +1 -1
- package/config/baseconfig.js +0 -0
|
@@ -75,7 +75,7 @@ async function getBSSessionDetails(sessiontype, bs_username, bs_pwd) {
|
|
|
75
75
|
const publicUrl = data[0].automation_session.public_url;
|
|
76
76
|
const duration = data[0].automation_session.duration;
|
|
77
77
|
BUFFER.setItem("REPORT_URL", publicUrl)
|
|
78
|
-
BUFFER.setItem("
|
|
78
|
+
BUFFER.setItem("FROTH_TOTAL_DURATION", duration)
|
|
79
79
|
|
|
80
80
|
//return jsondata;
|
|
81
81
|
} else if (response.status === 401) { //
|
package/config/android.conf.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const deepmerge = require('deepmerge')
|
|
2
2
|
const commonmobileconfig = require('./common.mobile.conf');
|
|
3
|
+
process.env.BROWSERSTACK = true;
|
|
4
|
+
|
|
3
5
|
const androidConfig = deepmerge.all([commonmobileconfig, {
|
|
4
6
|
services: [
|
|
5
7
|
[
|
|
@@ -19,6 +21,8 @@ const androidConfig = deepmerge.all([commonmobileconfig, {
|
|
|
19
21
|
|
|
20
22
|
capabilities: [{
|
|
21
23
|
'bstack:options': {
|
|
24
|
+
projectName: process.env.PROJECTNAME || "roboticodigital",
|
|
25
|
+
|
|
22
26
|
deviceName: process.env.DEVICENAME || 'Samsung Galaxy S23 Ultra',
|
|
23
27
|
platformVersion: process.env.OSVERSION || '13.0',
|
|
24
28
|
platformName: 'android',
|
package/config/api.conf.bs.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const deepmerge = require('deepmerge')
|
|
2
2
|
const commonmobileconfig = require('./common.mobile.conf');
|
|
3
|
+
|
|
3
4
|
const apiconfig = deepmerge.all([commonmobileconfig, {
|
|
4
5
|
|
|
5
6
|
|
|
@@ -20,6 +21,7 @@ const apiconfig = deepmerge.all([commonmobileconfig, {
|
|
|
20
21
|
capabilities: [
|
|
21
22
|
{
|
|
22
23
|
'bstack:options': {
|
|
24
|
+
projectName: process.env.PROJECTNAME || "roboticodigital",
|
|
23
25
|
|
|
24
26
|
browserName: process.env.BROWSERSTACK_BROWSER || 'chrome', // Choose the browser you want to test
|
|
25
27
|
browserVersion: process.env.BROWSERSTACK_BROWSER_VERSION || '129', // Specify the browser version
|
package/config/api.conf.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const deepmerge = require('deepmerge')
|
|
2
2
|
const commonmobileconfig = require('./common.mobile.conf');
|
|
3
|
+
process.env.BROWSERSTACK = false;
|
|
4
|
+
|
|
3
5
|
const apiconfig = deepmerge.all([commonmobileconfig, {
|
|
4
6
|
|
|
5
7
|
// ====================
|
|
@@ -14,7 +16,7 @@ const apiconfig = deepmerge.all([commonmobileconfig, {
|
|
|
14
16
|
|
|
15
17
|
before: function (capabilities, specs) {
|
|
16
18
|
// browser.maximizeWindow()
|
|
17
|
-
process.env.BS_SESSION_TYPE = "app-automate";
|
|
19
|
+
//process.env.BS_SESSION_TYPE = "app-automate";
|
|
18
20
|
},
|
|
19
21
|
|
|
20
22
|
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
const deepmerge = require('deepmerge')
|
|
2
2
|
const commonconfig = require('./commonconfig');
|
|
3
|
+
const isBrowserStackEnabled = process.env.BROWSERSTACK;
|
|
3
4
|
|
|
4
5
|
const commonmobconfig = deepmerge.all([commonconfig, {
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
|
|
8
|
+
// user: process.env.BROWSERSTACK_USERNAME,
|
|
9
|
+
// key: Buffer.from(process.env.BROWSERSTACK_ACCESS_KEY, 'base64').toString('utf-8'),
|
|
10
|
+
...(isBrowserStackEnabled && {
|
|
11
|
+
user: process.env.BROWSERSTACK_USERNAME,
|
|
12
|
+
key: Buffer.from(process.env.BROWSERSTACK_ACCESS_KEY, 'base64').toString('utf-8'),
|
|
13
|
+
commonCapabilities: {
|
|
14
|
+
'bstack:options': {
|
|
15
|
+
projectName: process.env.PROJECTNAME || "roboticodigital",
|
|
16
|
+
sessionName: 'Automation test session',
|
|
17
|
+
debug: true,
|
|
18
|
+
networkLogs: true
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}),
|
|
9
22
|
logLevel: 'info',
|
|
10
23
|
coloredLogs: true,
|
|
11
24
|
screenshotPath: './errorShots/',
|
|
@@ -26,15 +39,15 @@ const commonmobconfig = deepmerge.all([commonconfig, {
|
|
|
26
39
|
reporters: [
|
|
27
40
|
'spec'
|
|
28
41
|
],
|
|
29
|
-
commonCapabilities: {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
42
|
+
// commonCapabilities: {
|
|
43
|
+
// 'bstack:options': {
|
|
44
|
+
// projectName: process.env.PROJECTNAME || "roboticodigital",
|
|
45
|
+
// // buildName: "Automation Build",
|
|
46
|
+
// sessionName: 'Automation test session',
|
|
47
|
+
// debug: true,
|
|
48
|
+
// networkLogs: true
|
|
49
|
+
// }
|
|
50
|
+
// },
|
|
38
51
|
|
|
39
52
|
|
|
40
53
|
}]);
|
package/config/commonconfig.js
CHANGED
|
@@ -4,6 +4,7 @@ global.BUFFER = new LocalStorage('./storage');
|
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const exeDetails = require("../api/getexecutionDetails")
|
|
6
6
|
const getBSSessionDetails = require("../api/browsersatckSessionInfo")
|
|
7
|
+
const isBrowserStackEnabled = process.env.BROWSERSTACK;
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
// Description: This file contains the common configuration for the webdriverio framework.
|
|
@@ -33,7 +34,7 @@ const commonconfig = {
|
|
|
33
34
|
console.log("Running suite:", suite.title);
|
|
34
35
|
// const sessionId = browser.sessionId;
|
|
35
36
|
// BUFFER.setItem("SESSION_ID", sessionId)
|
|
36
|
-
if (
|
|
37
|
+
if (isBrowserStackEnabled) {
|
|
37
38
|
await getBSSessionDetails(process.env.BS_SESSION_TYPE, process.env.BROWSERSTACK_USERNAME, process.env.BROWSERSTACK_ACCESS_KEY);
|
|
38
39
|
}
|
|
39
40
|
const resultdetails = {};
|
|
@@ -78,7 +79,7 @@ const commonconfig = {
|
|
|
78
79
|
// BUFFER.setItem("FROTH_TOTAL_DURATION", Number(BUFFER.getItem("FROTH_TOTAL_DURATION")) + duration)
|
|
79
80
|
console.log(`Duration: ${duration}ms`);
|
|
80
81
|
console.log(`Passed: ${passed}`);
|
|
81
|
-
let scriptresult="NOT RUN";
|
|
82
|
+
let scriptresult = "NOT RUN";
|
|
82
83
|
let scriptid = BUFFER.getItem(fileName.replace(".js", ""))
|
|
83
84
|
|
|
84
85
|
if (passed) {
|
|
@@ -92,7 +93,7 @@ const commonconfig = {
|
|
|
92
93
|
scriptresult = "FAILED"
|
|
93
94
|
}
|
|
94
95
|
console.log('---------------------------------------');
|
|
95
|
-
await exeDetails.updateScriptExecutionStatus(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"),
|
|
96
|
+
await exeDetails.updateScriptExecutionStatus(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), scriptid, scriptresult)
|
|
96
97
|
|
|
97
98
|
},
|
|
98
99
|
/**
|
|
@@ -126,7 +127,9 @@ const commonconfig = {
|
|
|
126
127
|
|
|
127
128
|
console.log('This is the aftersession hook');
|
|
128
129
|
// await getBSSessionDetails(process.env.BS_SESSION_TYPE, process.env.BROWSERSTACK_USERNAME, Buffer.from(process.env.BROWSERSTACK_ACCESS_KEY, 'base64').toString('utf-8'));
|
|
129
|
-
|
|
130
|
+
if (isBrowserStackEnabled)
|
|
131
|
+
await getBSSessionDetails(process.env.BS_SESSION_TYPE, process.env.BROWSERSTACK_USERNAME, process.env.BROWSERSTACK_ACCESS_KEY);
|
|
132
|
+
|
|
130
133
|
const resultdetails = {}
|
|
131
134
|
resultdetails.excution_status = BUFFER.getItem("RESULT_DATA") == 0 ? 'PASSED' : 'FAILED'
|
|
132
135
|
console.log("Total Duration:" + BUFFER.getItem("FROTH_TOTAL_DURATION"));
|
package/config/ios.conf.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// This is the configuration file for iOS devices
|
|
2
2
|
const deepmerge = require('deepmerge')
|
|
3
3
|
const commonmobileconfig = require('./common.mobile.conf');
|
|
4
|
+
process.env.BROWSERSTACK = true;
|
|
5
|
+
|
|
4
6
|
const iosconfig = deepmerge.all([commonmobileconfig, {
|
|
5
7
|
services: [
|
|
6
8
|
[
|
|
@@ -20,6 +22,7 @@ const iosconfig = deepmerge.all([commonmobileconfig, {
|
|
|
20
22
|
|
|
21
23
|
capabilities: [{
|
|
22
24
|
'bstack:options': {
|
|
25
|
+
projectName: process.env.PROJECTNAME || "roboticodigital",
|
|
23
26
|
deviceName: process.env.DEVICENAME || "iPhone 15 Pro Max",
|
|
24
27
|
osVersion: process.env.OSVERSION || "17",
|
|
25
28
|
platformName: 'iOS',
|
package/config/web.conf.bs.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const deepmerge = require('deepmerge')
|
|
2
2
|
const commonmobileconfig = require('./common.mobile.conf');
|
|
3
|
+
process.env.BROWSERSTACK = true;
|
|
4
|
+
|
|
3
5
|
const webbsconfig = deepmerge.all([commonmobileconfig, {
|
|
4
6
|
|
|
5
7
|
|
|
@@ -20,6 +22,7 @@ const webbsconfig = deepmerge.all([commonmobileconfig, {
|
|
|
20
22
|
capabilities: [
|
|
21
23
|
{
|
|
22
24
|
'bstack:options': {
|
|
25
|
+
projectName: process.env.PROJECTNAME || "roboticodigital",
|
|
23
26
|
|
|
24
27
|
browserName: process.env.BROWSERSTACK_BROWSER || 'chrome', // Choose the browser you want to test
|
|
25
28
|
browserVersion: process.env.BROWSERSTACK_BROWSER_VERSION || '129', // Specify the browser version
|
package/package.json
CHANGED
package/config/baseconfig.js
DELETED
|
File without changes
|