* Closes the combobox dropdown.
()
| 236 | * Closes the combobox dropdown. |
| 237 | */ |
| 238 | async close(): Promise<void> { |
| 239 | let listbox = this.getListbox(); |
| 240 | if (listbox) { |
| 241 | act(() => this.getCombobox().focus()); |
| 242 | await this.user.keyboard('[Escape]'); |
| 243 | |
| 244 | await waitFor(() => { |
| 245 | if (document.contains(listbox)) { |
| 246 | throw new Error( |
| 247 | 'Expected listbox element to not be in the document after selecting an option' |
| 248 | ); |
| 249 | } else { |
| 250 | return true; |
| 251 | } |
| 252 | }); |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | /** |
| 257 | * Returns the combobox. |
nothing calls this directly
no test coverage detected