|
7 | 7 | scrollingContainerTypeArb, |
8 | 8 | } from '../__tests__/test-utils/property-arbitraries.ts'; |
9 | 9 | import { makeSnapshotState } from '../__tests__/test-utils/snapshot-builders.ts'; |
10 | | -import { buildActionableTouchTopology } from './actionable-touch-topology.ts'; |
11 | 10 | import { |
12 | 11 | classifyActionableTouchCandidates, |
| 12 | + createActionableTouchResolver, |
13 | 13 | resolveActionableTouchResolution, |
14 | 14 | } from './interaction-targeting.ts'; |
15 | 15 | import { |
@@ -204,20 +204,16 @@ test('falls back to the original node when no usable touch target exists', () => |
204 | 204 | assert.equal(resolution.node.label, 'Virtual item'); |
205 | 205 | }); |
206 | 206 |
|
207 | | -test('a prebuilt topology answers every policy branch exactly as the unindexed walk does', () => { |
| 207 | +test('the batch resolver preserves every actionability policy branch', () => { |
208 | 208 | const snapshot = makeSnapshotState(INDEXED_PARITY_POLICY_NODES); |
209 | | - const topology = buildActionableTouchTopology(snapshot.nodes); |
| 209 | + const resolveTouch = createActionableTouchResolver(snapshot.nodes); |
210 | 210 |
|
211 | 211 | const unindexed = snapshot.nodes.map((node) => |
212 | 212 | resolveActionableTouchResolution(snapshot.nodes, node), |
213 | 213 | ); |
214 | | - const indexed = snapshot.nodes.map((node) => |
215 | | - resolveActionableTouchResolution(snapshot.nodes, node, topology), |
216 | | - ); |
| 214 | + const indexed = snapshot.nodes.map(resolveTouch); |
217 | 215 |
|
218 | 216 | assert.deepEqual(indexed, unindexed); |
219 | | - // Pinned rather than merely equal: two identically broken implementations |
220 | | - // would also be deeply equal to each other. |
221 | 217 | assert.deepEqual( |
222 | 218 | indexed.map((resolution) => [resolution.node.index, resolution.reason]), |
223 | 219 | [ |
|
0 commit comments