Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit a2eb11b

Browse files
fix: Session creation issue due to conflict in capabilities (#69)
1 parent a14897a commit a2eb11b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"sequelize": "^6.6.5",
5656
"sequelize-cli": "^6.2.0",
5757
"sequelize-typescript": "^2.1.0",
58-
"sqlite3": "^5.0.2",
58+
"sqlite3": "^5.0.8",
5959
"typedi": "^0.10.0",
6060
"uuid": "^8.3.2",
6161
"vm2": "^3.9.8",

src/plugin/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ class AppiumDashboardPlugin extends BasePlugin {
9191
}
9292

9393
private async constructDesiredCapabilities(args: any) {
94+
if (!args[2].alwaysMatch) {
95+
return;
96+
}
9497
let rawCapabilities = Object.assign({}, args[2].firstMatch[0], args[2].alwaysMatch);
9598
CUSTOM_CAPABILITIES.forEach((capability) => {
9699
delete rawCapabilities[capability];
@@ -106,8 +109,7 @@ class AppiumDashboardPlugin extends BasePlugin {
106109
}
107110

108111
Object.keys(newCapabilities).forEach((k) => {
109-
args[2][k] = newCapabilities[k];
110-
args[2].firstMatch[0][k] = newCapabilities[k];
112+
args[2].alwaysMatch[k] = newCapabilities[k];
111113
});
112114
}
113115
}

0 commit comments

Comments
 (0)