Resolves the nested submenu panel associated with this menu item, if any exists.
()
| 54 | |
| 55 | /** Resolves the nested submenu panel associated with this menu item, if any exists. */ |
| 56 | async getSubmenu(): Promise<MenuHarness | null> { |
| 57 | const controlsId = await (await this.host()).getAttribute('aria-controls'); |
| 58 | if (controlsId) { |
| 59 | return this.documentRootLocatorFactory().locatorFor( |
| 60 | MenuHarness.with({selector: `#${controlsId}`}), |
| 61 | )(); |
| 62 | } |
| 63 | return null; |
| 64 | } |
| 65 | |
| 66 | /** Whether the menu item has focus. */ |
| 67 | async isFocused(): Promise<boolean> { |
no test coverage detected