diff --git a/dashboard-frontend b/dashboard-frontend index 2bb364ca..a855631a 160000 --- a/dashboard-frontend +++ b/dashboard-frontend @@ -1 +1 @@ -Subproject commit 2bb364cab28107f1798a1a9f33069acb1527bbd5 +Subproject commit a855631a3d3a932dd5a850a7ce61f2d9772e3ffc diff --git a/src/interfaces/ISessionCapability.ts b/src/interfaces/ISessionCapability.ts index b8cefc1e..304746df 100644 --- a/src/interfaces/ISessionCapability.ts +++ b/src/interfaces/ISessionCapability.ts @@ -46,7 +46,7 @@ export type CreateSessionResponseInternal = { // session id string, // capabilities - ISessionCapability, + Record, // protocol string?, ]; @@ -55,7 +55,7 @@ export type CreateSessionResponseInternal = { export type W3CNewSessionResponse = { value: { sessionId: string; - capabilities: ISessionCapability; + capabilities: Record; }; }; diff --git a/src/modules b/src/modules index 36180056..a7299a87 160000 --- a/src/modules +++ b/src/modules @@ -1 +1 @@ -Subproject commit 3618005683bc7c9abd8a03fefba392d1ad3ebdb0 +Subproject commit a7299a8718d0c569ed32c43d640437a4bc6a4b26 diff --git a/src/plugin.ts b/src/plugin.ts index 2a728712..9a0d75a5 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -477,17 +477,24 @@ class DevicePlugin extends BasePlugin { caps: ISessionCapability, ): Promise { const remoteUrl = `${nodeUrl(device, DevicePlugin.nodeBasePath)}/session`; - let capabilitiesToCreateSession = { capabilities: caps }; + const capabilitiesToCreateSession = { capabilities: caps }; if (device.hasOwnProperty('cloud') && device.cloud.toLowerCase() === Cloud.LAMBDATEST) { - if(capabilitiesToCreateSession.capabilities.alwaysMatch && Object.keys(capabilitiesToCreateSession.capabilities.alwaysMatch).length == 0) { + if ( + capabilitiesToCreateSession.capabilities.alwaysMatch && + Object.keys(capabilitiesToCreateSession.capabilities.alwaysMatch).length == 0 + ) { delete capabilitiesToCreateSession.capabilities.alwaysMatch; } - if(capabilitiesToCreateSession.capabilities.firstMatch && - _.isArray(capabilitiesToCreateSession.capabilities.firstMatch) && - (!capabilitiesToCreateSession.capabilities.firstMatch.length || - capabilitiesToCreateSession.capabilities.firstMatch.every(m => Object.keys(m).length ==0 ))) { - //@ts-ignore + if ( + capabilitiesToCreateSession.capabilities.firstMatch && + _.isArray(capabilitiesToCreateSession.capabilities.firstMatch) && + (!capabilitiesToCreateSession.capabilities.firstMatch.length || + capabilitiesToCreateSession.capabilities.firstMatch.every( + (m) => Object.keys(m).length == 0, + )) + ) { + //@ts-ignore delete capabilitiesToCreateSession.capabilities.firstMatch; } }