froth-webdriverio-framework 7.0.70 → 7.0.71
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/froth_configs/commonhook.js +13 -32
- package/package.json +1 -1
|
@@ -417,6 +417,19 @@ async function setupBrowserStackCapabilities(capabilities) {
|
|
|
417
417
|
Object.entries(bsOpts).forEach(([key, value]) => {
|
|
418
418
|
console.log(` ${key} : ${JSON.stringify(value)}`);
|
|
419
419
|
});
|
|
420
|
+
|
|
421
|
+
/** 🔹 App Automate */
|
|
422
|
+
if (process.env.BS_SESSION_TYPE === 'app-automate') {
|
|
423
|
+
const appPath = process.env.BROWSERSTACK_APP_PATH;
|
|
424
|
+
|
|
425
|
+
if (!appPath) {
|
|
426
|
+
throw new Error('❌ BROWSERSTACK_APP_PATH is missing');
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
bsOpts.app = appPath;
|
|
430
|
+
capabilities['appium:app'] = appPath;
|
|
431
|
+
}
|
|
432
|
+
|
|
420
433
|
/* 4️⃣ Amend / add uploadMedia */
|
|
421
434
|
const uploadMediaList = [
|
|
422
435
|
'media://8440f686585de9b46e1c966ce764703836f918bc'
|
|
@@ -438,39 +451,7 @@ async function setupBrowserStackCapabilities(capabilities) {
|
|
|
438
451
|
console.log('🟣 Final capabilities sent forward:');
|
|
439
452
|
console.log(JSON.stringify(capabilities, null, 2));
|
|
440
453
|
return capabilities;
|
|
441
|
-
};
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
/** 🔹 App Automate */
|
|
445
|
-
if (process.env.BS_SESSION_TYPE === 'app-automate') {
|
|
446
|
-
const appPath = process.env.BROWSERSTACK_APP_PATH;
|
|
447
|
-
|
|
448
|
-
if (!appPath) {
|
|
449
|
-
throw new Error('❌ BROWSERSTACK_APP_PATH is missing');
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
bsOpts.app = appPath;
|
|
453
|
-
capabilities['appium:app'] = appPath;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
/** 🔹 Media upload */
|
|
457
|
-
if (process.env.MEDIA_FILES) {
|
|
458
|
-
try {
|
|
459
|
-
const mediaList = JSON.parse(process.env.MEDIA_FILES);
|
|
460
|
-
if (Array.isArray(mediaList) && mediaList.length > 0) {
|
|
461
|
-
bsOpts.uploadMedia = mediaList;
|
|
462
|
-
}
|
|
463
|
-
} catch (err) {
|
|
464
|
-
console.warn('⚠️ MEDIA_FILES is not valid JSON', err);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
/** 🔹 Re-assign */
|
|
469
|
-
capabilities['bstack:options'] = bsOpts;
|
|
470
454
|
|
|
471
|
-
/** 🔹 Final BS log */
|
|
472
|
-
console.log('🚀 BrowserStack final options:');
|
|
473
|
-
console.log(JSON.stringify(bsOpts, null, 2));
|
|
474
455
|
}
|
|
475
456
|
|
|
476
457
|
async function validateTestSyntax(specs) {
|