froth-webdriverio-framework 3.0.63 → 3.0.64
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/commonMethods/apicall.js +3 -11
- package/commonMethods/jwt.js +14 -14
- package/config/android.conf.js +1 -1
- package/package.json +1 -1
package/commonMethods/apicall.js
CHANGED
|
@@ -115,25 +115,17 @@ async function validateAttributeData(attribute_name, attribute, buffer, bufferna
|
|
|
115
115
|
assertionStatus = true; // If assertion passes, set status to true
|
|
116
116
|
|
|
117
117
|
console.log("verification succeeded.");
|
|
118
|
-
let annotationMessage = `${attribute_name} verification passed. Actual text: ${attribute}, Expected text: ${valueToVerify}.`;
|
|
118
|
+
let annotationMessage = `${attribute_name} - verification passed. Actual text: ${attribute}, Expected text: ${valueToVerify}.`;
|
|
119
119
|
await amendToBrowserstack(annotationMessage, "info");
|
|
120
120
|
|
|
121
121
|
} catch (e) {
|
|
122
122
|
console.error('Error in validateAttributeData:', e);
|
|
123
123
|
console.log(`${attribute_name} verification failed. Expected text: ${valueToVerify}.`);
|
|
124
|
-
let annotationMessage = `${attribute_name} verification failed. Expected text: ${valueToVerify}.`;
|
|
124
|
+
let annotationMessage = `${attribute_name} - verification failed. Expected text: ${valueToVerify}.`;
|
|
125
125
|
await amendToBrowserstack(annotationMessage, "error");
|
|
126
126
|
|
|
127
127
|
throw e;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
// try {
|
|
132
|
-
// await driver.execute('browserstack_executor: {"action": "annotate", "arguments": {"data":"' + annotationMessage + '","level": "' + level + '"}}');
|
|
133
|
-
|
|
134
|
-
// } catch (error) {
|
|
135
|
-
// console.error('Error occurred while annoting to BS :', error);
|
|
136
|
-
// throw error;
|
|
137
|
-
// }
|
|
138
|
-
// }
|
|
130
|
+
|
|
139
131
|
module.exports = { callapi, validate };
|
package/commonMethods/jwt.js
CHANGED
|
@@ -47,18 +47,18 @@ function generateJWTToken(payload) {
|
|
|
47
47
|
//console.log('Signed and encoded JWT', jwt)
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
//
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
function main() {
|
|
51
|
+
// JWT Payload
|
|
52
|
+
const payload = {
|
|
53
|
+
iss: "YTLC_TEST_AUTOMATION_APP",
|
|
54
|
+
iat: currentTimestamp, // Issued at
|
|
55
|
+
exp: currentTimestamp + 200, // Expiry time: 30 seconds from issuance
|
|
56
|
+
user_agent: {
|
|
57
|
+
id: "janga.reddy@ytlcomms.my"
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
module.exports = { generateJWTToken}
|
|
61
|
+
console.log('JWT signed token:', generateJWTToken(payload));
|
|
62
|
+
}
|
|
63
|
+
main()
|
|
64
|
+
//module.exports = { generateJWTToken}
|
package/config/android.conf.js
CHANGED
|
@@ -31,7 +31,7 @@ const androidConfig = deepmerge.all([commonmobileconfig, {
|
|
|
31
31
|
networkLogs: "true",
|
|
32
32
|
debug: "true",
|
|
33
33
|
appProfiling: "true",
|
|
34
|
-
|
|
34
|
+
enableCameraImageInjection: "true",
|
|
35
35
|
|
|
36
36
|
deviceOrientation: process.env.DEVICENAME.toLowerCase().includes('tab') ? 'landscape' : 'portrait',
|
|
37
37
|
}
|