* Closes the dialog via the Escape key.
()
| 121 | * Closes the dialog via the Escape key. |
| 122 | */ |
| 123 | async close(): Promise<void> { |
| 124 | let dialog = this._dialog; |
| 125 | if (dialog) { |
| 126 | await this.user.keyboard('[Escape]'); |
| 127 | await waitFor(() => { |
| 128 | if (document.contains(dialog)) { |
| 129 | throw new Error('Expected the dialog to not be in the document after closing it.'); |
| 130 | } else { |
| 131 | this._dialog = undefined; |
| 132 | return true; |
| 133 | } |
| 134 | }); |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | /** |
| 139 | * Returns the dialog's trigger. |
nothing calls this directly
no outgoing calls
no test coverage detected