()
| 269 | } |
| 270 | |
| 271 | getMenuItems() { |
| 272 | // In a real menu with a child DropdownMenu, `this.getMenu()` should never |
| 273 | // be null, but it is sometimes null in tests. To mitigate that, we just |
| 274 | // use `this.getContainer()` as the fallback `menuContainer`. |
| 275 | const menuContainer = this.getMenu() || this.getContainer(); |
| 276 | return [].slice.call( |
| 277 | menuContainer.querySelectorAll(`[role="${this.getItemType()}"]`), |
| 278 | ); |
| 279 | } |
| 280 | |
| 281 | addEvents() { |
| 282 | ['click', 'touchstart', 'keyup'].forEach((event) => |
no test coverage detected