(snapshot)
| 111 | } |
| 112 | |
| 113 | export function layoutSignature(snapshot) { |
| 114 | // Virtualizers may reorder DOM nodes or recycle offscreen rows without moving |
| 115 | // visible content. Compare geometry in visual order, independent of that work. |
| 116 | let visible = snapshot && { |
| 117 | ...snapshot, |
| 118 | rows: snapshot.rows |
| 119 | .filter(row => row.top + row.height > 1 && row.top < snapshot.height - 1) |
| 120 | .sort((a, b) => a.top - b.top) |
| 121 | }; |
| 122 | return JSON.stringify(visible, (_, value) => |
| 123 | typeof value === 'number' ? Math.round(value * 10) / 10 : value |
| 124 | ); |
| 125 | } |
| 126 | |
| 127 | export async function settleLayout(expected) { |
| 128 | let previous; |
no test coverage detected