-
-
Notifications
You must be signed in to change notification settings - Fork 742
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected]
for the project I'm working on.
I wanted to provide additional clarification regarding the proposed modification to the 'if' statement in code. Specifically, I would like to emphasize that the 'bstack:options' key should not be prefixed with 'appium' as it may lead to improper execution of BrowserStack commands.
The rationale behind this change is to ensure that the code block executes when the value of the variable key is neither 'platformName' nor 'bstack:options.' It's crucial to avoid prefixing 'appium' to 'bstack:options' as doing so might hinder the correct execution of BrowserStack commands.
To illustrate the impact of this issue, I have attached a screenshot that demonstrates the problem when 'appium' is used as a prefix. Specifically, the 'buildName' and 'sessionName' were not captured correctly under this scenario.
I believe that by addressing this issue, we can ensure proper execution of BrowserStack commands and improve the reliability of codeceptJS.
Please take a moment to review the screenshot and the provided explanation. If you have any further questions or concerns, feel free to reach out.
Here is the diff that solved my problem:
diff --git a/node_modules/codeceptjs/lib/helper/Appium.js b/node_modules/codeceptjs/lib/helper/Appium.js
index d448c85..7a20393 100644
--- a/node_modules/codeceptjs/lib/helper/Appium.js
+++ b/node_modules/codeceptjs/lib/helper/Appium.js
@@ -276,7 +276,7 @@ class Appium extends Webdriver {
const _convertedCaps = {};
for (const [key, value] of Object.entries(capabilities)) {
if (!key.startsWith(vendorPrefix.appium)) {
- if (key !== 'platformName') {
+ if (key !== 'platformName' && key !== 'bstack:options') {
_convertedCaps[`${vendorPrefix.appium}:${key}`] = value;
} else {
_convertedCaps[`${key}`] = value;
This issue body was partially generated by patch-package.