-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add updatedWDABundleIdSuffix to handle bundle id for updatedWDABundleId with usePreinstalledWDA #871
Conversation
Thanks @KazuCocoa for a quick PR. This is going to help. |
lib/webdriveragent.js
Outdated
* | ||
* @returns {string} Bundle ID for Xctest. | ||
*/ | ||
get bundleIdForXctest () { | ||
return this.updatedWDABundleId ? `${this.updatedWDABundleId}.xctrunner` : WDA_RUNNER_BUNDLE_ID_FOR_XCTEST; | ||
return this.updatedWDABundleId ? | ||
`${this.updatedWDABundleId}${this.doNotAddXctrunnerSuffix ? '' : '.xctrunner'}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not quite sure we need to completely skip adding the suffix. There is a convention that xctest apps should have bundle ids ending with xctrunner
. Perhaps it would be just enough to check if the id already ends with and then skip adding the suffix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bundle id can be non- .xctrunner
when the bundle id in info.plist updated after wda build like downloading packages from https://github.com/appium/WebDriverAgent/releases and signed properly. XCTest session also can start with it.
lib/webdriveragent.js
Outdated
@@ -70,6 +70,7 @@ class WebDriverAgent { | |||
this.wdaLaunchTimeout = args.wdaLaunchTimeout || WDA_LAUNCH_TIMEOUT; | |||
this.usePreinstalledWDA = args.usePreinstalledWDA; | |||
this.xctestApiClient = null; | |||
this.doNotAddXctrunnerSuffix = args.doNotAddXctrunnerSuffix; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about changing this cap to updatedWDABundleIdSuffix
and have it equal to .xctrunner
by default?
this way it would clearly be visible to where this capability belongs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, it sounds good idea
lib/webdriveragent.js
Outdated
@@ -70,6 +70,7 @@ class WebDriverAgent { | |||
this.wdaLaunchTimeout = args.wdaLaunchTimeout || WDA_LAUNCH_TIMEOUT; | |||
this.usePreinstalledWDA = args.usePreinstalledWDA; | |||
this.xctestApiClient = null; | |||
this.updatedWDABundleIdSuffix = _.isString(args.updatedWDABundleIdSuffix) ? args.updatedWDABundleIdSuffix : DEFAULT_TEST_BUNDLE_SUFFIX; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
= args.updatedWDABundleIdSuffix ?? DEFAULT_TEST_BUNDLE_SUFFIX
## [8.1.0](v8.0.2...v8.1.0) (2024-03-26) ### Features * add updatedWDABundleIdSuffix to handle bundle id for updatedWDABundleId with usePreinstalledWDA ([#871](#871)) ([d79b624](d79b624))
🎉 This PR is included in version 8.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
For more advanced usage of https://appium.github.io/appium-xcuitest-driver/latest/guides/run-preinstalled-wda/
appium/appium-xcuitest-driver#2358 has some description about this usage.
When a user apply a sign with an arbitrary bundle id, the bundle id does not require
.xctrunner
. In the case, current usage of adding.xctrunner
does not work for theappium:usePreinstalledWDA
. This is a bit more advanced usage but natural thing in a real device.I understand adding a new cap is not good but we need a new one to ignore the
.xctrunner
withupdatedWDABundleId
combination forusePreinstalledWDA