( predicate: Exclude<IsPredicate, 'exists' | 'hidden'>, expectedText: string, selector: string, session: SessionState, node: SnapshotNode, )
| 408 | } |
| 409 | |
| 410 | function buildDirectIosIsResult( |
| 411 | predicate: Exclude<IsPredicate, 'exists' | 'hidden'>, |
| 412 | expectedText: string, |
| 413 | selector: string, |
| 414 | session: SessionState, |
| 415 | node: SnapshotNode, |
| 416 | ): Record<string, unknown> | null { |
| 417 | const result = evaluateIsPredicate({ |
| 418 | predicate, |
| 419 | node, |
| 420 | nodes: [node], |
| 421 | expectedText, |
| 422 | platform: session.device.platform, |
| 423 | }); |
| 424 | return { |
| 425 | predicate, |
| 426 | pass: result.pass, |
| 427 | selector, |
| 428 | ...(predicate === 'text' ? { text: result.actualText } : {}), |
| 429 | selectorChain: [selector], |
| 430 | }; |
| 431 | } |
| 432 | |
| 433 | function readDirectIosSelectorNode(data: Record<string, unknown>): SnapshotNode | undefined { |
| 434 | const nodes = data.nodes; |
no test coverage detected
searching dependent graphs…