(page, viewport)
| 167 | // Traverses the collection in this mounted instance so layout history accumulates. |
| 168 | // A direct scrollTop assignment would skip the workload these scenarios target. |
| 169 | async function traverseDeep(page, viewport) { |
| 170 | let list = page.locator(viewport); |
| 171 | await list.hover(); |
| 172 | let box = await list.boundingBox(); |
| 173 | let session = await page.context().newCDPSession(page); |
| 174 | try { |
| 175 | await session.send('Input.synthesizeScrollGesture', { |
| 176 | x: box.x + box.width / 2, |
| 177 | y: box.y + box.height / 2, |
| 178 | yDistance: -deepScrollStart, |
| 179 | speed: 40000, |
| 180 | gestureSourceType: 'mouse', |
| 181 | preventFling: true |
| 182 | }); |
| 183 | } finally { |
| 184 | await session.detach(); |
| 185 | } |
| 186 | await page.waitForFunction( |
| 187 | ([viewport, start]) => Math.abs(document.querySelector(viewport).scrollTop - start) <= 1, |
| 188 | [viewport, deepScrollStart] |
| 189 | ); |
| 190 | } |
| 191 | |
| 192 | async function prepareDeepTable({page}) { |
| 193 | await page.locator('[data-record="item-0"]').waitFor(); |
no outgoing calls
no test coverage detected