()
| 256 | } |
| 257 | |
| 258 | function getCurrentPage() { |
| 259 | const page = getPages().find(button => { |
| 260 | return button.hasAttribute('aria-current') |
| 261 | }) |
| 262 | if (page) { |
| 263 | return page |
| 264 | } |
| 265 | |
| 266 | throw new Error('Unable to find a button with `aria-current`') |
| 267 | } |
| 268 | |
| 269 | function getPreviousPage() { |
| 270 | return screen.getByRole('button', { |
no test coverage detected