( edge: ScrollEdge, scope: string | undefined, cause: unknown, )
| 133 | } |
| 134 | |
| 135 | function buildScrollEdgeVerificationError( |
| 136 | edge: ScrollEdge, |
| 137 | scope: string | undefined, |
| 138 | cause: unknown, |
| 139 | ): AppError { |
| 140 | if (scope) { |
| 141 | return new AppError( |
| 142 | 'COMMAND_FAILED', |
| 143 | `Failed to verify scroll ${edge} state for scoped container`, |
| 144 | { |
| 145 | scope, |
| 146 | hint: `scroll ${edge} could not verify the scoped scroll container. Run snapshot -i for the current screen and retry with a visible scroll target.`, |
| 147 | }, |
| 148 | cause, |
| 149 | ); |
| 150 | } |
| 151 | return new AppError( |
| 152 | 'COMMAND_FAILED', |
| 153 | `Failed to verify scroll ${edge} state`, |
| 154 | { |
| 155 | hint: `scroll ${edge} needs a snapshot showing hidden content ${edge === 'bottom' ? 'below' : 'above'} before it will move.`, |
| 156 | }, |
| 157 | cause, |
| 158 | ); |
| 159 | } |
| 160 | |
| 161 | function ensureSnapshotNodes(nodes: readonly (RawSnapshotNode | SnapshotNode)[]): SnapshotNode[] { |
| 162 | return nodes.map((node, index) => ({ |
no outgoing calls
no test coverage detected