* Opens the list and picks an option by `data-key` (string) or visible * name (RegExp). Uses a synthetic click, which is what react-aria options * inside popovers reliably respond to under test.
(keyOrName: string | RegExp)
| 38 | * inside popovers reliably respond to under test. |
| 39 | */ |
| 40 | async select(keyOrName: string | RegExp): Promise<void> { |
| 41 | await this.open(); |
| 42 | await this.option(keyOrName).dispatchEvent("click"); |
| 43 | await expect(this.listbox).toBeHidden({ timeout: DEFAULT_TIMEOUT }); |
| 44 | } |
| 45 | |
| 46 | /** Value of the hidden native `<select>` that mirrors the selection. */ |
| 47 | async nativeValue(scope: Locator = this.page.locator("body")): Promise<string> { |
no test coverage detected