froth-webdriverio-framework 7.0.91 → 7.0.93
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.
|
@@ -47,18 +47,18 @@ async function getExecuitonDetails(frothUrl, token, id) {
|
|
|
47
47
|
headers: DEFAULT_HEADERS(token)
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
const data = await handleResponse(response, 'getExecuitonDetails');
|
|
51
|
-
if (!data) return null;
|
|
50
|
+
// const data = await handleResponse(response, 'getExecuitonDetails');
|
|
51
|
+
// if (!data) return null;
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
//
|
|
53
|
+
let data = await handleResponse(response, 'getExecuitonDetails');
|
|
54
|
+
// let responseData = await response.json()
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
//
|
|
56
|
+
data = await aes.decrpytData(data.data)
|
|
57
|
+
// console.log("after decrypting",data)
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
//
|
|
61
|
-
|
|
59
|
+
data = JSON.parse(data)
|
|
60
|
+
// console.log("json parsing",data)
|
|
61
|
+
if (!data) return null;
|
|
62
62
|
|
|
63
63
|
const jsondata = {
|
|
64
64
|
automation_suite_id: data?.automation_suite_details?.id ?? null,
|
|
@@ -29,24 +29,24 @@ async function getSuiteDetails(frothUrl, token, suiteId) {
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
const data = await handleResponse(response, 'getExecuitonDetails');
|
|
33
|
-
if (!data) return null;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
32
|
+
// const data = await handleResponse(response, 'getExecuitonDetails');
|
|
33
|
+
// if (!data) return null;
|
|
34
|
+
|
|
35
|
+
let resData = await handleResponse(response, 'getSuiteDetails');
|
|
36
|
+
if (!resData || !resData.data) return jsonData;
|
|
37
|
+
|
|
38
|
+
// Decrypt the data
|
|
39
|
+
let decryptedData = await aes.decrpytData(resData.data);
|
|
40
|
+
if (!decryptedData) return jsonData;
|
|
41
|
+
|
|
42
|
+
// Parse JSON
|
|
43
|
+
let data;
|
|
44
|
+
try {
|
|
45
|
+
data = JSON.parse(decryptedData);
|
|
46
|
+
} catch (parseError) {
|
|
47
|
+
console.error('Failed to parse decrypted data:', parseError);
|
|
48
|
+
return jsonData;
|
|
49
|
+
}
|
|
50
50
|
|
|
51
51
|
// Map data to default structure
|
|
52
52
|
jsonData = {
|
|
@@ -39,6 +39,14 @@ module.exports = (bsCaps) => {
|
|
|
39
39
|
if (uploadMediaList?.length) {
|
|
40
40
|
bstackOptions.uploadMedia = uploadMediaList;
|
|
41
41
|
}
|
|
42
|
+
if (bsCaps.platformName === 'android'){
|
|
43
|
+
capabilities['autoGrantPermissions'] = true;
|
|
44
|
+
capabilities['appium:autoGrantPermissions'] = true;
|
|
45
|
+
}
|
|
46
|
+
else
|
|
47
|
+
// capabilities['appium:autoGrantPermissions'] = bsCaps.autoGrantPermissions;
|
|
48
|
+
capabilities['autoAcceptAlerts'] = true;
|
|
49
|
+
|
|
42
50
|
|
|
43
51
|
return {
|
|
44
52
|
...commonHooks,
|
|
@@ -180,19 +180,7 @@ const commonHooks = {
|
|
|
180
180
|
console.log("Config deatils :" + JSON.stringify(config, null, 2));
|
|
181
181
|
|
|
182
182
|
|
|
183
|
-
|
|
184
|
-
// try {
|
|
185
|
-
// const mediaList = JSON.parse(process.env.MEDIA_FILES);
|
|
186
|
-
// console.log("media files are", mediaList)
|
|
187
|
-
// if (Array.isArray(mediaList) && mediaList.length > 0) {
|
|
188
|
-
// bsOpts.uploadMedia = mediaList;
|
|
189
|
-
// console.log('✅ uploadMedia injected:', mediaList);
|
|
190
|
-
// }
|
|
191
|
-
// } catch (err) {
|
|
192
|
-
// console.warn('⚠️ MEDIA_FILES is not valid JSON', err);
|
|
193
|
-
// }
|
|
194
|
-
// }
|
|
195
|
-
// capabilities['bstack:options'] = bsOpts;
|
|
183
|
+
|
|
196
184
|
|
|
197
185
|
}
|
|
198
186
|
console.log('🔎 Final capabilities:', JSON.stringify(capabilities, null, 2));
|