(tree, col, delta)
| 36 | } |
| 37 | |
| 38 | function resizeCol(tree, col, delta) { |
| 39 | act(() => { |
| 40 | setInteractionModality('pointer'); |
| 41 | }); |
| 42 | let column = getColumn(tree, col); |
| 43 | let resizer = within(column).getByRole('slider'); |
| 44 | |
| 45 | fireEvent.pointerEnter(resizer); |
| 46 | |
| 47 | // actual locations do not matter, the delta matters between events for the calculation of useMove |
| 48 | fireEvent.pointerDown(resizer, {pointerType: 'mouse', pointerId: 1, pageX: 0, pageY: 30}); |
| 49 | fireEvent.pointerMove(resizer, {pointerType: 'mouse', pointerId: 1, pageX: delta, pageY: 25}); |
| 50 | fireEvent.pointerUp(resizer, {pointerType: 'mouse', pointerId: 1}); |
| 51 | } |
| 52 | |
| 53 | function resizeTable(clientWidth, newValue) { |
| 54 | clientWidth.mockImplementation(() => newValue); |
no test coverage detected