Skip to content

Commit

Permalink
Fix session creation when wda is not uploaded (#1128)
Browse files Browse the repository at this point in the history
* Fix session creation when wda is not uploaded

* Update submodule

* bump up version
  • Loading branch information
sudharsan-selvaraj authored May 23, 2024
1 parent b4d179f commit 22c7ecf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "appium-device-farm",
"version": "8.4.7-rc.32",
"version": "8.4.7-rc.33",
"description": "An appium 2.0 plugin that manages and create driver session on available devices",
"main": "./lib/src/main.js",
"scripts": {
Expand Down
12 changes: 7 additions & 5 deletions src/CapabilityManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@ export async function iOSCapabilities(
caps.firstMatch[0]['appium:wdaLocalPort'] = freeDevice.wdaLocalPort;
caps.firstMatch[0]['appium:mjpegServerPort'] = freeDevice.mjpegServerPort;
if (freeDevice.realDevice && !caps.firstMatch[0]['df:skipReport']) {
const { appBundleId } = (await prisma.appInformation.findFirst({
const wdaInfo = await prisma.appInformation.findFirst({
where: { fileName: 'wda-resign.ipa' },
})) as any;
caps.firstMatch[0]['appium:usePreinstalledWDA'] = true;
caps.firstMatch[0]['appium:updatedWDABundleId'] = appBundleId;
caps.firstMatch[0]['appium:updatedWDABundleIdSuffix'] = '';
});
if (wdaInfo) {
caps.firstMatch[0]['appium:usePreinstalledWDA'] = true;
caps.firstMatch[0]['appium:updatedWDABundleId'] = wdaInfo.appBundleId;
caps.firstMatch[0]['appium:updatedWDABundleIdSuffix'] = '';
}
}
const deleteMatch = [
'appium:derivedDataPath',
Expand Down
2 changes: 1 addition & 1 deletion src/modules

0 comments on commit 22c7ecf

Please sign in to comment.