(flow: FlowDetail)
| 373 | |
| 374 | /** Every observed call one flow answer reports, as ordered pairs. */ |
| 375 | export function flowObservations(flow: FlowDetail): { from: BugPathNode; to: BugPathNode; observed: ObservedRecord }[] { |
| 376 | const out: { from: BugPathNode; to: BugPathNode; observed: ObservedRecord }[] = []; |
| 377 | flow.steps.forEach((step) => { |
| 378 | if (step.observed === undefined || step.parent < 0 || step.parent >= flow.steps.length) { |
| 379 | return; |
| 380 | } |
| 381 | const parent = flow.steps[step.parent]; |
| 382 | out.push({ |
| 383 | from: { name: parent.name, filePath: parent.filePath }, |
| 384 | to: { name: step.name, filePath: step.filePath }, |
| 385 | observed: step.observed, |
| 386 | }); |
| 387 | }); |
| 388 | return out; |
| 389 | } |
| 390 | |
| 391 | /** True when a flow's steps hold the symbol the wizard is about. */ |
| 392 | export function flowTouches(flow: FlowDetail, target: BugPathNode): boolean { |
no test coverage detected