-
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
Changes from 3 commits
f4daa62
beb9f23
ab93838
3e9f754
737905a
fa10099
71a62ea
d957298
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,7 @@ class WebDriverAgent { | |
this.wdaLaunchTimeout = args.wdaLaunchTimeout || WDA_LAUNCH_TIMEOUT; | ||
this.usePreinstalledWDA = args.usePreinstalledWDA; | ||
this.xctestApiClient = null; | ||
this.doNotAddXctrunnerSuffix = args.doNotAddXctrunnerSuffix; | ||
|
||
this.xcodebuild = this.canSkipXcodebuild | ||
? null | ||
|
@@ -111,11 +112,17 @@ class WebDriverAgent { | |
} | ||
|
||
/** | ||
* Return bundle id for WebDriverAgent to launch the WDA. | ||
* The primary usage is with 'this.usePreinstalledWDA'. | ||
* It adds `.xctrunner` as suffix by default but 'this.doNotAddXctrunnerSuffix' | ||
* lets skip it. | ||
* | ||
* @returns {string} Bundle ID for Xctest. | ||
*/ | ||
get bundleIdForXctest () { | ||
return this.updatedWDABundleId ? `${this.updatedWDABundleId}.xctrunner` : WDA_RUNNER_BUNDLE_ID_FOR_XCTEST; | ||
mykola-mokhnach marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return this.updatedWDABundleId ? | ||
`${this.updatedWDABundleId}${this.doNotAddXctrunnerSuffix ? '' : '.xctrunner'}` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bundle id can be non- |
||
: `${this.doNotAddXctrunnerSuffix ? WDA_RUNNER_BUNDLE_ID : WDA_RUNNER_BUNDLE_ID_FOR_XCTEST}`; | ||
} | ||
|
||
setWDAPaths (bootstrapPath, agentPath) { | ||
|
@@ -449,7 +456,7 @@ class WebDriverAgent { | |
const {wdaBundleId, testBundleId} = await this.prepareWDA(); | ||
const env = { | ||
USE_PORT: this.wdaRemotePort, | ||
WDA_PRODUCT_BUNDLE_IDENTIFIER: this.updatedWDABundleId, | ||
WDA_PRODUCT_BUNDLE_IDENTIFIER: this.bundleIdForXctest, | ||
}; | ||
if (this.mjpegServerPort) { | ||
env.MJPEG_SERVER_PORT = this.mjpegServerPort; | ||
|
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