* Returns a row matching the specified index or text content.
(opts: {indexOrText: number | string})
| 59 | * Returns a row matching the specified index or text content. |
| 60 | */ |
| 61 | findRow(opts: {indexOrText: number | string}): HTMLElement { |
| 62 | let {indexOrText} = opts; |
| 63 | |
| 64 | let row; |
| 65 | if (typeof indexOrText === 'number') { |
| 66 | row = this.getRows()[indexOrText]; |
| 67 | } else if (typeof indexOrText === 'string') { |
| 68 | row = within(this.getTree()!).getByText(indexOrText).closest('[role=row]')! as HTMLElement; |
| 69 | } |
| 70 | |
| 71 | return row; |
| 72 | } |
| 73 | |
| 74 | private async keyboardNavigateToRow(opts: { |
| 75 | row: HTMLElement; |
no test coverage detected