(lease: DeviceLease, prepared: CloudWebDriverPreparedSession)
| 345 | } |
| 346 | |
| 347 | private deviceForLease(lease: DeviceLease, prepared: CloudWebDriverPreparedSession): DeviceInfo { |
| 348 | return { |
| 349 | ...deviceFieldsFromPublicPlatform(prepared.platform), |
| 350 | id: |
| 351 | prepared.deviceId ?? |
| 352 | this.options.deviceId?.(lease) ?? |
| 353 | `${this.provider}:${prepared.platform}:${lease.leaseId}`, |
| 354 | name: prepared.deviceName, |
| 355 | kind: 'device', |
| 356 | target: 'mobile', |
| 357 | booted: true, |
| 358 | }; |
| 359 | } |
| 360 | |
| 361 | private findSessionForDevice(device: DeviceInfo): WebDriverProviderSession | undefined { |
| 362 | return [...this.sessionsByLeaseId.values()].find((session) => session.device.id === device.id); |
no test coverage detected