( device: DeviceInfo, interactor: Interactor, positionals: string[], context: DispatchContext | undefined, )
| 310 | } |
| 311 | |
| 312 | async function handleTriggerAppEventCommand( |
| 313 | device: DeviceInfo, |
| 314 | interactor: Interactor, |
| 315 | positionals: string[], |
| 316 | context: DispatchContext | undefined, |
| 317 | ): Promise<Record<string, unknown>> { |
| 318 | const { eventName, payload } = parseTriggerAppEventArgs(positionals); |
| 319 | const eventUrl = resolveAppEventUrl(device, eventName, payload); |
| 320 | await interactor.open(eventUrl, { appBundleId: context?.appBundleId }); |
| 321 | return { |
| 322 | event: eventName, |
| 323 | eventUrl, |
| 324 | transport: 'deep-link', |
| 325 | ...successText(`Triggered app event: ${eventName}`), |
| 326 | }; |
| 327 | } |
| 328 | |
| 329 | async function handleScreenshotCommand( |
| 330 | interactor: Interactor, |
no test coverage detected