({
scrollLeft,
scrollTop
}: {
scrollLeft?: number;
scrollTop?: number;
})
| 105 | } |
| 106 | |
| 107 | export async function scrollGrid({ |
| 108 | scrollLeft, |
| 109 | scrollTop |
| 110 | }: { |
| 111 | scrollLeft?: number; |
| 112 | scrollTop?: number; |
| 113 | }) { |
| 114 | const grid = getGrid().element(); |
| 115 | |
| 116 | if (scrollLeft !== undefined) { |
| 117 | grid.scrollLeft = scrollLeft; |
| 118 | } |
| 119 | if (scrollTop !== undefined) { |
| 120 | grid.scrollTop = scrollTop; |
| 121 | } |
| 122 | |
| 123 | if (scrollLeft !== undefined || scrollTop !== undefined) { |
| 124 | // let the browser fire the 'scroll' event |
| 125 | await new Promise(requestAnimationFrame); |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | export async function tabIntoGrid() { |
| 130 | await userEvent.click(page.getByRole('button', { name: 'Before' })); |
no test coverage detected