(tree, name)
| 26 | |
| 27 | // I'd use tree.getByRole(role, {name: text}) here, but it's unbearably slow. |
| 28 | function getColumn(tree, name) { |
| 29 | // Find by text, then go up to the element with the cell role. |
| 30 | let el = tree.getByText(name); |
| 31 | while (el && !/columnheader/.test(el.getAttribute('role'))) { |
| 32 | el = el.parentElement; |
| 33 | } |
| 34 | |
| 35 | return el; |
| 36 | } |
| 37 | |
| 38 | function resizeCol(tree, col, delta) { |
| 39 | act(() => { |